diff options
author | Michael Maltese <[email protected]> | 2017-03-27 23:05:09 -0700 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2017-03-31 09:05:07 -0700 |
commit | 04826edb13c23a2b53732d63b09b24e05ca83d87 (patch) | |
tree | ccd14a4de42a3776e7a88b68cc9b1ee3e3cfc2be /test/test_tone.cpp | |
parent | bfcc6e29d315d3b5e1f7c454c117a4d4a393054e (diff) | |
download | cubeb-04826edb13c23a2b53732d63b09b24e05ca83d87.tar.gz cubeb-04826edb13c23a2b53732d63b09b24e05ca83d87.zip |
WASAPI: make callback_input return !stm->draining
Fixes #262: Capture stream freezes on WASAPI when resampling.
The previous behavior would return false (and thus stop all future
callbacks) if the user didn't process all frames in linear_input_buffer.
This could erroneously happen when the resampler held back frames for
the next batch (e.g. 448 input frames at 44.1 KHz upsampled to 48 KHz,
which doesn't have a perfect integer scale), so the user callback didn't
have access to all of the current linear input frames.
The refill() function already handles the case where the user callback
returns less than the number of frames passed in (by settings
stm->draining), so this commit changes the callback_input() return value
to defer to that.
Diffstat (limited to 'test/test_tone.cpp')
0 files changed, 0 insertions, 0 deletions