Commit f388aade authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #28679: audio: use correctly sized buffer for resampling

parent 63a40673
...@@ -101,9 +101,8 @@ void SamplerateConverter::resample(const AudioBuffer &dataIn, AudioBuffer &dataO ...@@ -101,9 +101,8 @@ void SamplerateConverter::resample(const AudioBuffer &dataIn, AudioBuffer &dataO
/* /*
TODO: one-shot deinterleave and float-to-short conversion TODO: one-shot deinterleave and float-to-short conversion
currently using floatBufferIn_ as scratch
*/ */
SFLAudioSample *scratch_buff = reinterpret_cast<SFLAudioSample *>(; std::vector<SFLAudioSample> scratch_buff(outSamples);
src_float_to_short_array(, scratch_buff, outSamples); src_float_to_short_array(,, outSamples);
dataOut.deinterleave(scratch_buff, src_data.output_frames, nbChans); dataOut.deinterleave(, src_data.output_frames, nbChans);
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment