Bug 1020205 - Reset mRemainingResamplerTail when no longer using the resampler. r=padenot, a=sledru
authorKarl Tomlinson <karlt+@karlt.net>
Thu, 03 Jul 2014 15:53:34 +1200
changeset 200740 1db524a4b295d9de885483793038e73e63b8c8f1
parent 200735 635e32a71297e5634b9f40f86e9b5fa83d7d4a49
child 200741 307ac98a19c2dd981180e18582979ed1364cca96
push id486
push userasasaki@mozilla.com
push dateMon, 14 Jul 2014 18:39:42 +0000
treeherdermozilla-release@d33428174ff1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot, sledru
bugs1020205
milestone31.0
Bug 1020205 - Reset mRemainingResamplerTail when no longer using the resampler. r=padenot, a=sledru
content/media/webaudio/AudioBufferSourceNode.cpp
--- a/content/media/webaudio/AudioBufferSourceNode.cpp
+++ b/content/media/webaudio/AudioBufferSourceNode.cpp
@@ -150,16 +150,17 @@ public:
         (aChannels != mChannels ||
          // If the resampler has begun, then it will have moved
          // mBufferPosition to after the samples it has read, but it hasn't
          // output its buffered samples.  Keep using the resampler, even if
          // the rates now match, so that this latent segment is output.
          (aOutRate == mBufferSampleRate && !BegunResampling()))) {
       speex_resampler_destroy(mResampler);
       mResampler = nullptr;
+      mRemainingResamplerTail = 0;
       mBeginProcessing = mStart + 0.5;
     }
 
     if (aOutRate == mBufferSampleRate && !mResampler) {
       return;
     }
 
     if (!mResampler) {