Bug 891254 - Fix the usage of uninitialized samples when the input to a ConvolverNode has a volume. r=roc, a=webaudio
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 18 Jul 2013 10:22:47 -0400
changeset 147941 cf83a645ad5859f320c022fc81e2bdfadff31835
parent 147940 777c69b17263a93e3196d716e409285c6cb4a973
child 147942 4a29a65a3cba146092d5ab8b9219749792f06008
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, webaudio
bugs891254
milestone24.0a2
Bug 891254 - Fix the usage of uninitialized samples when the input to a ConvolverNode has a volume. r=roc, a=webaudio
content/media/webaudio/ConvolverNode.cpp
--- a/content/media/webaudio/ConvolverNode.cpp
+++ b/content/media/webaudio/ConvolverNode.cpp
@@ -139,17 +139,17 @@ public:
     } else {
       if (aInput.mVolume != 1.0f) {
         // Pre-multiply the input's volume
         uint32_t numChannels = aInput.mChannelData.Length();
         AllocateAudioBlock(numChannels, &input);
         for (uint32_t i = 0; i < numChannels; ++i) {
           const float* src = static_cast<const float*>(aInput.mChannelData[i]);
           float* dest = static_cast<float*>(const_cast<void*>(input.mChannelData[i]));
-          AudioBlockAddChannelWithScale(src, aInput.mVolume, dest);
+          AudioBlockCopyChannelWithScale(src, aInput.mVolume, dest);
         }
       }
 
       if (mLeftOverData <= 0) {
         nsRefPtr<PlayingRefChanged> refchanged =
           new PlayingRefChanged(aStream, PlayingRefChanged::ADDREF);
         NS_DispatchToMainThread(refchanged);
       }