mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-17 14:22:00 +00:00
Alsa renderer better error messages
This commit is contained in:
@@ -44,13 +44,6 @@ int nv_alsa_play(const unsigned char* indata, int data_len) {
|
|||||||
int rc = snd_pcm_writei(handle, indata, frames);
|
int rc = snd_pcm_writei(handle, indata, frames);
|
||||||
if (rc == -EPIPE) {
|
if (rc == -EPIPE) {
|
||||||
snd_pcm_prepare(handle);
|
snd_pcm_prepare(handle);
|
||||||
} else if (rc < 0) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"error from writei: %s\n",
|
|
||||||
snd_strerror(rc));
|
|
||||||
} else if (rc != (int) frames) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"short write, write %d frames\n", rc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class AlsaAudioRenderer implements AudioRenderer {
|
|||||||
public void streamInitialized(int channelCount, int sampleRate) {
|
public void streamInitialized(int channelCount, int sampleRate) {
|
||||||
int ret = AlsaAudio.init(channelCount, sampleRate, device);
|
int ret = AlsaAudio.init(channelCount, sampleRate, device);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
throw new IllegalStateException("AVC decoder initialization failure: "+ret);
|
throw new IllegalStateException("Alsa renderer initialization failure: "+ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user