mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
audio: fix time stretching regression
This commit is contained in:
parent
4520f7646f
commit
44585b98cc
1 changed files with 4 additions and 1 deletions
|
@ -33,7 +33,10 @@ void audio_resampler::put_samples(const f32* buf, u32 sample_cnt)
|
||||||
|
|
||||||
std::pair<f32* /* buffer */, u32 /* samples */> audio_resampler::get_samples(u32 sample_cnt)
|
std::pair<f32* /* buffer */, u32 /* samples */> audio_resampler::get_samples(u32 sample_cnt)
|
||||||
{
|
{
|
||||||
return std::make_pair(resampler.bufBegin(), resampler.receiveSamples(sample_cnt));
|
// NOTE: Make sure to get the buffer first because receiveSamples advances its position internally
|
||||||
|
// and std::make_pair evaluates the second parameter first...
|
||||||
|
f32 *const buf = resampler.bufBegin();
|
||||||
|
return std::make_pair(buf, resampler.receiveSamples(sample_cnt));
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 audio_resampler::samples_available() const
|
u32 audio_resampler::samples_available() const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue