зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 187fa323cec6 (bug 997870)
--HG-- extra : rebase_source : afb3581dd9855fcacab840806020617df12d6afd
This commit is contained in:
Родитель
39bd1d3c7d
Коммит
0fdb348584
|
@ -151,15 +151,15 @@ public:
|
|||
{
|
||||
double frequency, detune;
|
||||
|
||||
// Shortcut if frequency-related AudioParam are not automated, and we
|
||||
// already have computed the frequency information and related parameters.
|
||||
if (!ParametersMayNeedUpdate()) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool simpleFrequency = mFrequency.HasSimpleValue();
|
||||
bool simpleDetune = mDetune.HasSimpleValue();
|
||||
|
||||
// Shortcut if frequency-related AudioParam are not automated, and we
|
||||
// already have computed the frequency information and related parameters.
|
||||
if (simpleFrequency && simpleDetune && !mRecomputeParameters) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (simpleFrequency) {
|
||||
frequency = mFrequency.GetValue();
|
||||
} else {
|
||||
|
@ -212,13 +212,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool ParametersMayNeedUpdate()
|
||||
{
|
||||
return mDetune.HasSimpleValue() ||
|
||||
mFrequency.HasSimpleValue() ||
|
||||
mRecomputeParameters;
|
||||
}
|
||||
|
||||
void ComputeCustom(float* aOutput,
|
||||
StreamTime ticks,
|
||||
uint32_t aStart,
|
||||
|
@ -238,22 +231,12 @@ public:
|
|||
// mPhase runs [0,periodicWaveSize) here instead of [0,2*M_PI).
|
||||
float basePhaseIncrement = mPeriodicWave->rateScale();
|
||||
|
||||
bool parametersMayNeedUpdate = ParametersMayNeedUpdate();
|
||||
if (!parametersMayNeedUpdate) {
|
||||
for (uint32_t i = aStart; i < aEnd; ++i) {
|
||||
UpdateParametersIfNeeded(ticks, i);
|
||||
mPeriodicWave->waveDataForFundamentalFrequency(mFinalFrequency,
|
||||
lowerWaveData,
|
||||
higherWaveData,
|
||||
tableInterpolationFactor);
|
||||
}
|
||||
|
||||
for (uint32_t i = aStart; i < aEnd; ++i) {
|
||||
if (parametersMayNeedUpdate) {
|
||||
mPeriodicWave->waveDataForFundamentalFrequency(mFinalFrequency,
|
||||
lowerWaveData,
|
||||
higherWaveData,
|
||||
tableInterpolationFactor);
|
||||
UpdateParametersIfNeeded(ticks, i);
|
||||
}
|
||||
// Bilinear interpolation between adjacent samples in each table.
|
||||
float floorPhase = floorf(mPhase);
|
||||
uint32_t j1 = floorPhase;
|
||||
|
|
Загрузка…
Ссылка в новой задаче