diff options
Diffstat (limited to 'audio')
-rw-r--r-- | audio/esdaudio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/esdaudio.c b/audio/esdaudio.c index 033d3bc..a06176e 100644 --- a/audio/esdaudio.c +++ b/audio/esdaudio.c @@ -137,6 +137,8 @@ static int qesd_run_out (HWVoiceOut *hw) O("EsounD output thread write error: %s", strerror(errno)); break; } + if (nwrite == 0) + break; writeSamples = nwrite >> hw->info.shift; writeBytes = writeSamples << hw->info.shift; @@ -288,6 +290,8 @@ static int qesd_run_in (HWVoiceIn *hw) qesd_logerr (errno, "read failed: %s\n", strerror(errno)); break; } + if (nread == 0) + break; readSamples = nread >> hw->info.shift; readBytes = readSamples << hw->info.shift; |