зеркало из https://github.com/mozilla/gecko-dev.git
b=1074765 use greater weight for nearer sample in PeriodicWave interpolation r=rillian
--HG-- extra : rebase_source : 0c6ac8b0a870caa4bf5e770fe431aebe25b5af26
This commit is contained in:
Родитель
534ee9bcad
Коммит
b7f87dd74c
|
@ -395,12 +395,12 @@ public:
|
|||
j2 -= periodicWaveSize;
|
||||
}
|
||||
float sampleInterpolationFactor = mPhase - j1;
|
||||
float lower = sampleInterpolationFactor * lowerWaveData[j1] +
|
||||
(1 - sampleInterpolationFactor) * lowerWaveData[j2];
|
||||
float higher = sampleInterpolationFactor * higherWaveData[j1] +
|
||||
(1 - sampleInterpolationFactor) * higherWaveData[j2];
|
||||
aOutput[i] = tableInterpolationFactor * lower +
|
||||
(1 - tableInterpolationFactor) * higher;
|
||||
float lower = (1.0f - sampleInterpolationFactor) * lowerWaveData[j1] +
|
||||
sampleInterpolationFactor * lowerWaveData[j2];
|
||||
float higher = (1.0f - sampleInterpolationFactor) * higherWaveData[j1] +
|
||||
sampleInterpolationFactor * higherWaveData[j2];
|
||||
aOutput[i] = (1.0f - tableInterpolationFactor) * lower +
|
||||
tableInterpolationFactor * higher;
|
||||
|
||||
mPhase += basePhaseIncrement * mFinalFrequency;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче