Bug 886653 - Don't call speex_resampler_skip_zeros when changing the rate in AudioBufferSourceNode. r=ehsan, a=webaudio
authorPaul Adenot <paul@paul.cx>
Fri, 12 Jul 2013 17:21:51 +0200
changeset 147907 853f08e10baf35164e3d860f31997cb4e451e8f8
parent 147906 2c68df0e3a54db2dd5bf11293467da450a66ba23
child 147908 300800156548b99860553b681eb5f7da7cda17c4
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)
reviewersehsan, webaudio
bugs886653
milestone24.0a2
Bug 886653 - Don't call speex_resampler_skip_zeros when changing the rate in AudioBufferSourceNode. r=ehsan, a=webaudio
content/media/webaudio/AudioBufferSourceNode.cpp
--- a/content/media/webaudio/AudioBufferSourceNode.cpp
+++ b/content/media/webaudio/AudioBufferSourceNode.cpp
@@ -344,17 +344,16 @@ public:
 
     uint32_t currentOutSampleRate, currentInSampleRate;
     if (ShouldResample(aStream->SampleRate())) {
       SpeexResamplerState* resampler = Resampler(aStream, aChannels);
       speex_resampler_get_rate(resampler, &currentInSampleRate, &currentOutSampleRate);
       uint32_t finalSampleRate = ComputeFinalOutSampleRate(aStream->SampleRate());
       if (currentOutSampleRate != finalSampleRate) {
         speex_resampler_set_rate(resampler, currentInSampleRate, finalSampleRate);
-        speex_resampler_skip_zeros(mResampler);
       }
     }
   }
 
   virtual void ProduceAudioBlock(AudioNodeStream* aStream,
                                  const AudioChunk& aInput,
                                  AudioChunk* aOutput,
                                  bool* aFinished)