1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-29 22:58:39 +02:00

Set the 't' value to where we actually are in the stream, so that we calculate the right warpfactors, avoiding glitches.

This commit is contained in:
martynshaw99 2012-11-15 00:38:43 +00:00
parent a908ace018
commit 4b9a934ab4

View File

@ -378,7 +378,7 @@ sampleCount Mixer::MixVariableRates(int *channelFlags, WaveTrack *track,
double trackRate = track->GetRate();
double initialWarp = mRate / trackRate;
double tstep = 1.0 / trackRate;
double t = *pos / trackRate;
double t = (*pos - *queueLen) / trackRate;
int sampleSize = SAMPLE_SIZE(floatSample);
sampleCount out = 0;
@ -580,8 +580,7 @@ sampleCount Mixer::Process(sampleCount maxToProcess)
}
}
if (mTimeTrack ||
track->GetRate() != mRate)
if (mTimeTrack || track->GetRate() != mRate)
out = MixVariableRates(channelFlags, track,
&mSamplePos[i], mSampleQueue[i],
&mQueueStart[i], &mQueueLen[i], mResample[i]);