diff options
-rw-r--r-- | audio/dsoundaudio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/audio/dsoundaudio.c b/audio/dsoundaudio.c index 9e621c8899..a08d519cae 100644 --- a/audio/dsoundaudio.c +++ b/audio/dsoundaudio.c @@ -542,6 +542,11 @@ static void *dsound_get_buffer_in(HWVoiceIn *hw, size_t *size) req_size = audio_ring_dist(cpos, hw->pos_emul, hw->size_emul); req_size = MIN(req_size, hw->size_emul - hw->pos_emul); + if (req_size == 0) { + *size = 0; + return NULL; + } + err = dsound_lock_in(dscb, &hw->info, hw->pos_emul, req_size, &ret, NULL, &act_size, NULL, false, ds->s); if (err) { |