b=956604 rename block version of AudioBufferInPlaceScale to AudioBlockInPlaceScale r=padenot

--HG--
extra : transplant_source : %EE%9C%0D%B4%F0S%DA%AFX%3D%D2%10H%28-%82%EE%B5%AB%84
This commit is contained in:
Karl Tomlinson 2014-01-08 16:57:26 +13:00
parent 45006c4e57
commit 65f6a47487
4 changed files with 9 additions and 9 deletions

View File

@ -155,9 +155,9 @@ AudioBlockCopyChannelWithScale(const float aInput[WEBAUDIO_BLOCK_SIZE],
}
void
AudioBufferInPlaceScale(float aBlock[WEBAUDIO_BLOCK_SIZE],
uint32_t aChannelCount,
float aScale)
AudioBlockInPlaceScale(float aBlock[WEBAUDIO_BLOCK_SIZE],
uint32_t aChannelCount,
float aScale)
{
AudioBufferInPlaceScale(aBlock, aChannelCount, aScale, WEBAUDIO_BLOCK_SIZE);
}

View File

@ -149,9 +149,9 @@ float AudioBufferPeakValue(const float* aInput, uint32_t aSize);
/**
* In place gain. aScale == 1.0f should be optimized.
*/
void AudioBufferInPlaceScale(float aBlock[WEBAUDIO_BLOCK_SIZE],
uint32_t aChannelCount,
float aScale);
void AudioBlockInPlaceScale(float aBlock[WEBAUDIO_BLOCK_SIZE],
uint32_t aChannelCount,
float aScale);
/**
* In place gain. aScale == 1.0f should be optimized.

View File

@ -288,8 +288,8 @@ AnalyserNode::AppendChunk(const AudioChunk& aChunk)
mBuffer.Elements() + mWriteIndex);
}
if (channelCount > 1) {
AudioBufferInPlaceScale(mBuffer.Elements() + mWriteIndex, 1,
1.0f / aChunk.mChannelData.Length());
AudioBlockInPlaceScale(mBuffer.Elements() + mWriteIndex, 1,
1.0f / aChunk.mChannelData.Length());
}
mWriteIndex += chunkDuration;
MOZ_ASSERT(mWriteIndex <= bufferSize);

View File

@ -395,7 +395,7 @@ PannerNodeEngine::DistanceAndConeGain(AudioChunk* aChunk, float aGain)
float* samples = static_cast<float*>(const_cast<void*>(*aChunk->mChannelData.Elements()));
uint32_t channelCount = aChunk->mChannelData.Length();
AudioBufferInPlaceScale(samples, channelCount, aGain);
AudioBlockInPlaceScale(samples, channelCount, aGain);
}
// This algorithm is specified in the webaudio spec.