From 935171df4fa9c55c03e45d99c4c96ddcebb27e8a Mon Sep 17 00:00:00 2001 From: Kyle Simpson Date: Tue, 29 Aug 2023 10:35:43 +0100 Subject: [PATCH] Driver: Correct buffer instantiation for Rubato I had slightly misread the changes from 0.12->0.14, so buffers were not correctly instantiated for resampling. --- src/driver/tasks/mixer/mix_logic.rs | 2 +- src/input/adapters/cached/util.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/driver/tasks/mixer/mix_logic.rs b/src/driver/tasks/mixer/mix_logic.rs index 472669c75..9e8633101 100644 --- a/src/driver/tasks/mixer/mix_logic.rs +++ b/src/driver/tasks/mixer/mix_logic.rs @@ -172,7 +172,7 @@ pub fn mix_symph_indiv( chan_c, ) .expect("Failed to create resampler."); - let out_buf = resampler.output_buffer_allocate(false); + let out_buf = resampler.output_buffer_allocate(true); (chan_c, resampler, out_buf) }); diff --git a/src/input/adapters/cached/util.rs b/src/input/adapters/cached/util.rs index f0cc3351a..0a417ce08 100644 --- a/src/input/adapters/cached/util.rs +++ b/src/input/adapters/cached/util.rs @@ -88,7 +88,7 @@ impl ToAudioBytes { ) .expect("Failed to create resampler."); - let resampled_data = resampler.output_buffer_allocate(false); + let resampled_data = resampler.output_buffer_allocate(true); ResampleState { resampled_data,