mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-02 06:40:12 +01:00
Restart of Mixer is same as Reposition at t0
This commit is contained in:
20
src/Mix.cpp
20
src/Mix.cpp
@@ -708,20 +708,7 @@ double Mixer::MixGetCurrentTime()
|
||||
|
||||
void Mixer::Restart()
|
||||
{
|
||||
mTime = mT0;
|
||||
|
||||
for(size_t i=0; i<mNumInputTracks; i++)
|
||||
mSamplePos[i] = mInputTrack[i].GetTrack()->TimeToLongSamples(mT0);
|
||||
|
||||
for(size_t i=0; i<mNumInputTracks; i++) {
|
||||
mQueueStart[i] = 0;
|
||||
mQueueLen[i] = 0;
|
||||
}
|
||||
|
||||
// Bug 1887: libsoxr 0.1.3, first used in Audacity 2.3.0, crashes with
|
||||
// constant rate resampling if you try to reuse the resampler after it has
|
||||
// flushed. Should that be considered a bug in sox? This works around it:
|
||||
MakeResamplers();
|
||||
Reposition( mT0 );
|
||||
}
|
||||
|
||||
void Mixer::Reposition(double t)
|
||||
@@ -738,6 +725,11 @@ void Mixer::Reposition(double t)
|
||||
mQueueStart[i] = 0;
|
||||
mQueueLen[i] = 0;
|
||||
}
|
||||
|
||||
// Bug 1887: libsoxr 0.1.3, first used in Audacity 2.3.0, crashes with
|
||||
// constant rate resampling if you try to reuse the resampler after it has
|
||||
// flushed. Should that be considered a bug in sox? This works around it:
|
||||
MakeResamplers();
|
||||
}
|
||||
|
||||
void Mixer::SetTimesAndSpeed(double t0, double t1, double speed)
|
||||
|
||||
Reference in New Issue
Block a user