Bug 1232326 - Uninitialised value use in AudioBufferInPlaceScale. r=dminor.
authorJulian Seward <jseward@acm.org>
Wed, 16 Dec 2015 17:36:21 +0100
changeset 315927 1bbcfa05140d54748d602899545cb91c3d1dbb31
parent 315926 68c00debbc808d71f522b613169cdee5303e5c1c
child 315928 d265db3920debd1148d3347627d62de311fbcee1
push id8488
push usercykesiopka.bmo@gmail.com
push dateThu, 17 Dec 2015 08:02:04 +0000
reviewersdminor
bugs1232326
milestone46.0a1
Bug 1232326 - Uninitialised value use in AudioBufferInPlaceScale. r=dminor.
dom/media/webaudio/blink/PeriodicWave.cpp
--- a/dom/media/webaudio/blink/PeriodicWave.cpp
+++ b/dom/media/webaudio/blink/PeriodicWave.cpp
@@ -105,16 +105,17 @@ PeriodicWave::createTriangle(float sampl
     periodicWave->generateBasicWaveform(OscillatorType::Triangle);
     return periodicWave.forget();
 }
 
 PeriodicWave::PeriodicWave(float sampleRate, size_t numberOfComponents)
     : m_sampleRate(sampleRate)
     , m_centsPerRange(CentsPerRange)
     , m_lowestRequestedFundamentalFrequency(std::numeric_limits<float>::max())
+    , m_normalizationScale(1.0f)
 {
     float nyquist = 0.5 * m_sampleRate;
 
     if (numberOfComponents <= MinPeriodicWaveSize) {
         m_periodicWaveSize = MinPeriodicWaveSize;
     } else {
         unsigned npow2 = powf(2.0f, floorf(logf(numberOfComponents - 1.0)/logf(2.0f) + 1.0f));
         m_periodicWaveSize = std::min(MaxPeriodicWaveSize, npow2);