mirror of
https://github.com/azahar-emu/soundtouch
synced 2025-11-06 23:20:03 +01:00
bugfix: flush() didn't properly flush final samples from the pipeline on 2nd time, in case that soundtouch object instance were recycled and used for processing a 2nd audio stream.
This commit is contained in:
parent
9287800b65
commit
882f248a0c
@ -359,6 +359,7 @@ void SoundTouch::flush()
|
||||
|
||||
// how many samples are still expected to output
|
||||
numStillExpected = (int)((long)(samplesExpectedOut + 0.5) - samplesOutput);
|
||||
if (numStillExpected < 0) numStillExpected = 0;
|
||||
|
||||
memset(buff, 0, 128 * channels * sizeof(SAMPLETYPE));
|
||||
// "Push" the last active samples out from the processing pipeline by
|
||||
@ -477,6 +478,7 @@ int SoundTouch::getSetting(int settingId) const
|
||||
void SoundTouch::clear()
|
||||
{
|
||||
samplesExpectedOut = 0;
|
||||
samplesOutput = 0;
|
||||
pRateTransposer->clear();
|
||||
pTDStretch->clear();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user