aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb_resampler.cpp
diff options
context:
space:
mode:
authorPaul Adenot <[email protected]>2016-03-23 17:50:16 +0100
committerPaul Adenot <[email protected]>2016-03-23 18:45:33 +0100
commit6279accc9d3032f6e8f2f9a3d03659d98cae4b7f (patch)
tree70318249c75aac5937cfc5d5f380758f6ebd7bea /src/cubeb_resampler.cpp
parentaba500cc3f0d21fc856317800daa90e29566a0c4 (diff)
downloadcubeb-6279accc9d3032f6e8f2f9a3d03659d98cae4b7f.tar.gz
cubeb-6279accc9d3032f6e8f2f9a3d03659d98cae4b7f.zip
Fully remove the old resampler draining logic.
Diffstat (limited to 'src/cubeb_resampler.cpp')
-rw-r--r--src/cubeb_resampler.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/cubeb_resampler.cpp b/src/cubeb_resampler.cpp
index 7687f41..c8e6a66 100644
--- a/src/cubeb_resampler.cpp
+++ b/src/cubeb_resampler.cpp
@@ -120,23 +120,19 @@ cubeb_resampler_speex<T, InputProcessor, OutputProcessor>
long output_frames_before_processing = 0;
- if (!draining) {
- /* fill directly the input buffer of the output processor to save a copy */
- output_frames_before_processing =
- output_processor->input_needed_for_output(output_frames_needed);
-
- out_unprocessed =
- output_processor->input_buffer(output_frames_before_processing);
+ /* fill directly the input buffer of the output processor to save a copy */
+ output_frames_before_processing =
+ output_processor->input_needed_for_output(output_frames_needed);
- got = data_callback(stream, user_ptr,
- nullptr, out_unprocessed,
- output_frames_before_processing);
+ out_unprocessed =
+ output_processor->input_buffer(output_frames_before_processing);
- }
+ got = data_callback(stream, user_ptr,
+ nullptr, out_unprocessed,
+ output_frames_before_processing);
output_processor->written(got);
-
/* Process the output. If not enough frames have been returned from the
* callback, drain the processors. */
return output_processor->output(output_buffer, output_frames_needed);