diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/webaudio/media_element_audio_source_node.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/modules/webaudio/media_element_audio_source_node.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chromium/third_party/blink/renderer/modules/webaudio/media_element_audio_source_node.cc b/chromium/third_party/blink/renderer/modules/webaudio/media_element_audio_source_node.cc index 1f179e1665b..5cdd8fcdf0e 100644 --- a/chromium/third_party/blink/renderer/modules/webaudio/media_element_audio_source_node.cc +++ b/chromium/third_party/blink/renderer/modules/webaudio/media_element_audio_source_node.cc @@ -33,6 +33,7 @@ #include "third_party/blink/renderer/core/html/media/html_media_element.h" #include "third_party/blink/renderer/core/inspector/console_message.h" #include "third_party/blink/renderer/modules/webaudio/audio_context.h" +#include "third_party/blink/renderer/modules/webaudio/audio_graph_tracer.h" #include "third_party/blink/renderer/modules/webaudio/audio_node_output.h" #include "third_party/blink/renderer/platform/audio/audio_utilities.h" #include "third_party/blink/renderer/platform/bindings/exception_state.h" @@ -185,7 +186,8 @@ void MediaElementAudioSourceHandler::ProvideResamplerInput( DCHECK(Context()->IsAudioThread()); DCHECK(MediaElement()); DCHECK(dest); - MediaElement()->GetAudioSourceProvider().ProvideInput(dest, dest->length()); + MediaElement()->GetAudioSourceProvider().ProvideInput( + dest, base::checked_cast<int>(dest->length())); } void MediaElementAudioSourceHandler::Process(uint32_t number_of_frames) { @@ -213,14 +215,15 @@ void MediaElementAudioSourceHandler::Process(uint32_t number_of_frames) { AudioSourceProvider& provider = MediaElement()->GetAudioSourceProvider(); // Grab data from the provider so that the element continues to make // progress, even if we're going to output silence anyway. + const int frames_int = base::checked_cast<int>(number_of_frames); if (multi_channel_resampler_.get()) { DCHECK_NE(source_sample_rate_, Context()->sampleRate()); - multi_channel_resampler_->Resample(number_of_frames, output_bus); + multi_channel_resampler_->Resample(frames_int, output_bus); } else { // Bypass the resampler completely if the source is at the context's // sample-rate. DCHECK_EQ(source_sample_rate_, Context()->sampleRate()); - provider.ProvideInput(output_bus, number_of_frames); + provider.ProvideInput(output_bus, frames_int); } // Output silence if we don't have access to the element. if (is_origin_tainted_) { |