diff --git a/dom/media/webaudio/WaveShaperNode.cpp b/dom/media/webaudio/WaveShaperNode.cpp index 5be595100735..29846ee37bd0 100644 --- a/dom/media/webaudio/WaveShaperNode.cpp +++ b/dom/media/webaudio/WaveShaperNode.cpp @@ -229,7 +229,9 @@ public: AllocateAudioBlock(channelCount, aOutput); for (uint32_t i = 0; i < channelCount; ++i) { - const float* inputBuffer = static_cast(aInput.mChannelData[i]); + float* scaledSample = (float *)(aInput.mChannelData[i]); + AudioBlockInPlaceScale(scaledSample, aInput.mVolume); + const float* inputBuffer = static_cast(scaledSample); float* outputBuffer = const_cast (static_cast(aOutput->mChannelData[i])); float* sampleBuffer; diff --git a/dom/media/webaudio/test/mochitest.ini b/dom/media/webaudio/test/mochitest.ini index db6b26ffa146..94a90e7a6ab6 100644 --- a/dom/media/webaudio/test/mochitest.ini +++ b/dom/media/webaudio/test/mochitest.ini @@ -84,6 +84,7 @@ tags=capturestream tags=capturestream [test_bug972678.html] [test_bug1056032.html] +[test_bug1118372.html] skip-if = toolkit == 'android' # bug 1056706 [test_channelMergerNode.html] [test_channelMergerNodeWithVolume.html] diff --git a/dom/media/webaudio/test/test_bug1118372.html b/dom/media/webaudio/test/test_bug1118372.html new file mode 100644 index 000000000000..ca3fc6b0df26 --- /dev/null +++ b/dom/media/webaudio/test/test_bug1118372.html @@ -0,0 +1,46 @@ + + + + Test WaveShaperNode with no curve + + + + + +
+
+
+ +