mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-12 07:35:51 +01: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:
@@ -378,7 +378,7 @@ sampleCount Mixer::MixVariableRates(int *channelFlags, WaveTrack *track,
|
|||||||
double trackRate = track->GetRate();
|
double trackRate = track->GetRate();
|
||||||
double initialWarp = mRate / trackRate;
|
double initialWarp = mRate / trackRate;
|
||||||
double tstep = 1.0 / trackRate;
|
double tstep = 1.0 / trackRate;
|
||||||
double t = *pos / trackRate;
|
double t = (*pos - *queueLen) / trackRate;
|
||||||
int sampleSize = SAMPLE_SIZE(floatSample);
|
int sampleSize = SAMPLE_SIZE(floatSample);
|
||||||
|
|
||||||
sampleCount out = 0;
|
sampleCount out = 0;
|
||||||
@@ -580,8 +580,7 @@ sampleCount Mixer::Process(sampleCount maxToProcess)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mTimeTrack ||
|
if (mTimeTrack || track->GetRate() != mRate)
|
||||||
track->GetRate() != mRate)
|
|
||||||
out = MixVariableRates(channelFlags, track,
|
out = MixVariableRates(channelFlags, track,
|
||||||
&mSamplePos[i], mSampleQueue[i],
|
&mSamplePos[i], mSampleQueue[i],
|
||||||
&mQueueStart[i], &mQueueLen[i], mResample[i]);
|
&mQueueStart[i], &mQueueLen[i], mResample[i]);
|
||||||
|
|||||||
Reference in New Issue
Block a user