Index: third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp |
diff --git a/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp |
index df8653550ec04ddea1bf6853eea3986a1df25fb0..b5f191a1a3a78b971ecdf2977f98f82520d3d103 100644 |
--- a/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp |
+++ b/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp |
@@ -98,8 +98,8 @@ void MediaElementAudioSourceHandler::setFormat(size_t numberOfChannels, |
m_sourceNumberOfChannels = numberOfChannels; |
m_sourceSampleRate = sourceSampleRate; |
- if (sourceSampleRate != sampleRate()) { |
- double scaleFactor = sourceSampleRate / sampleRate(); |
+ if (sourceSampleRate != context()->sampleRate()) { |
+ double scaleFactor = sourceSampleRate / context()->sampleRate(); |
m_multiChannelResampler = |
makeUnique<MultiChannelResampler>(scaleFactor, numberOfChannels); |
} else { |
@@ -176,12 +176,12 @@ void MediaElementAudioSourceHandler::process(size_t numberOfFrames) { |
// Grab data from the provider so that the element continues to make |
// progress, even if we're going to output silence anyway. |
if (m_multiChannelResampler.get()) { |
- DCHECK_NE(m_sourceSampleRate, sampleRate()); |
+ DCHECK_NE(m_sourceSampleRate, context()->sampleRate()); |
m_multiChannelResampler->process(&provider, outputBus, numberOfFrames); |
} else { |
// Bypass the resampler completely if the source is at the context's |
// sample-rate. |
- DCHECK_EQ(m_sourceSampleRate, sampleRate()); |
+ DCHECK_EQ(m_sourceSampleRate, context()->sampleRate()); |
provider.provideInput(outputBus, numberOfFrames); |
} |
// Output silence if we don't have access to the element. |