Commit 7ffc90f3 authored by Volker Rümelin's avatar Volker Rümelin Committed by Gerd Hoffmann
Browse files

audio: fix audio recording



With current code audio recording with all audio backends
except PulseAudio and DirectSound is broken. The generic audio
recording buffer management forgot to update the current read
position after a read.

Fixes: ff095e52 "audio: api for mixeng code free backends"

Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
Reviewed-by: default avatarZoltán Kővágó <DirtY.iCE.hu@gmail.com>
Message-id: 2fc947cf-7b42-de68-3f11-cbcf1c096be9@t-online.de
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 39e28210
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1390,6 +1390,7 @@ void *audio_generic_get_buffer_in(HWVoiceIn *hw, size_t *size)
        size_t read = hw->pcm_ops->read(hw, hw->buf_emul + hw->pos_emul,
                                        read_len);
        hw->pending_emul += read;
        hw->pos_emul = (hw->pos_emul + read) % hw->size_emul;
        if (read < read_len) {
            break;
        }