diff options
author | Paul Adenot <[email protected]> | 2020-07-23 16:21:17 +0200 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2020-09-09 14:30:03 +0200 |
commit | 410bdd2112921c869fcdcecc35bc43ad73da8591 (patch) | |
tree | 013c7a1c6a15bfb28f32720db67fecc47beceb61 | |
parent | 955bb9476937e5eacb3cece539b87f04663a86d0 (diff) | |
download | cubeb-410bdd2112921c869fcdcecc35bc43ad73da8591.tar.gz cubeb-410bdd2112921c869fcdcecc35bc43ad73da8591.zip |
Don't return early when there is no input data.
This is simply wrong. Input data are accumulated into the buffer, and
the buffer is emptied into the resampler. The resampler controls the
buffering. It's certainly possible to not have input data here, and
having had two packet worth of data in a previous callback.
This fixes constant glitches on a Sony WH1000-mk3, and doesn't seem to
regress the wired/built-in devices I have.
-rw-r--r-- | src/cubeb_wasapi.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/cubeb_wasapi.cpp b/src/cubeb_wasapi.cpp index 2754d7f..2be7cde 100644 --- a/src/cubeb_wasapi.cpp +++ b/src/cubeb_wasapi.cpp @@ -1038,9 +1038,6 @@ refill_callback_duplex(cubeb_stream * stm) } input_frames = stm->linear_input_buffer->length() / stm->input_stream_params.channels; - if (!input_frames) { - return true; - } rv = get_output_buffer(stm, output_buffer, output_frames); if (!rv) { |