From 299b72e2080d67b542da491cd1ea2b241b7f0530 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 23 Apr 2017 15:10:34 +0200 Subject: [PATCH] Revert "Cleanups" This reverts commit a4963d2a19ffd01951977cfbb70257e2eae63c14. --- audio/audio_driver.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index 40c4722e48..445b47b7d5 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -554,6 +554,8 @@ static bool audio_driver_flush(const int16_t *data, size_t samples) } } + src_data.data_out = audio_driver_output_samples_buf; + if (audio_driver_control) { /* Readjust the audio input rate. */ @@ -582,27 +584,24 @@ static bool audio_driver_flush(const int16_t *data, size_t samples) #endif } - src_data.data_out = audio_driver_output_samples_buf; - src_data.ratio = audio_source_ratio_current; + src_data.ratio = audio_source_ratio_current; if (is_slowmotion) src_data.ratio *= settings->slowmotion_ratio; audio_driver_resampler->process(audio_driver_resampler_data, &src_data); + output_data = audio_driver_output_samples_buf; output_frames = (unsigned)src_data.output_frames; if (audio_driver_use_float) - { - output_data = audio_driver_output_samples_buf; output_frames *= sizeof(float); - } else { convert_float_to_s16(audio_driver_output_samples_conv_buf, (const float*)output_data, output_frames * 2); - output_data = audio_driver_output_samples_conv_buf; + output_data = audio_driver_output_samples_conv_buf; output_frames *= sizeof(int16_t); }