Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(597)

Unified Diff: third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp

Issue 1865583002: Implement BaseAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 f8a43d0da25f9adc2d0ccdf599620686bb102f70..52f25e6a4e8934a77fe4f518aa570524610df9ce 100644
--- a/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp
@@ -27,8 +27,8 @@
#include "core/frame/ConsoleTypes.h"
#include "core/html/HTMLMediaElement.h"
#include "core/inspector/ConsoleMessage.h"
-#include "modules/webaudio/AbstractAudioContext.h"
#include "modules/webaudio/AudioNodeOutput.h"
+#include "modules/webaudio/BaseAudioContext.h"
#include "platform/Logging.h"
#include "platform/audio/AudioUtilities.h"
#include "platform/weborigin/SecurityOrigin.h"
@@ -72,7 +72,7 @@ void MediaElementAudioSourceHandler::dispose()
void MediaElementAudioSourceHandler::setFormat(size_t numberOfChannels, float sourceSampleRate)
{
if (numberOfChannels != m_sourceNumberOfChannels || sourceSampleRate != m_sourceSampleRate) {
- if (!numberOfChannels || numberOfChannels > AbstractAudioContext::maxNumberOfChannels() || !AudioUtilities::isValidAudioBufferSampleRate(sourceSampleRate)) {
+ if (!numberOfChannels || numberOfChannels > BaseAudioContext::maxNumberOfChannels() || !AudioUtilities::isValidAudioBufferSampleRate(sourceSampleRate)) {
// process() will generate silence for these uninitialized values.
WTF_LOG(Media, "MediaElementAudioSourceNode::setFormat(%u, %f) - unhandled format change", static_cast<unsigned>(numberOfChannels), sourceSampleRate);
// Synchronize with process().
@@ -99,7 +99,7 @@ void MediaElementAudioSourceHandler::setFormat(size_t numberOfChannels, float so
{
// The context must be locked when changing the number of output channels.
- AbstractAudioContext::AutoLocker contextLocker(context());
+ BaseAudioContext::AutoLocker contextLocker(context());
// Do any necesssary re-configuration to the output's number of channels.
output(0).setNumberOfChannels(numberOfChannels);
@@ -203,13 +203,13 @@ void MediaElementAudioSourceHandler::unlock()
// ----------------------------------------------------------------
-MediaElementAudioSourceNode::MediaElementAudioSourceNode(AbstractAudioContext& context, HTMLMediaElement& mediaElement)
+MediaElementAudioSourceNode::MediaElementAudioSourceNode(BaseAudioContext& context, HTMLMediaElement& mediaElement)
: AudioSourceNode(context)
{
setHandler(MediaElementAudioSourceHandler::create(*this, mediaElement));
}
-MediaElementAudioSourceNode* MediaElementAudioSourceNode::create(AbstractAudioContext& context, HTMLMediaElement& mediaElement)
+MediaElementAudioSourceNode* MediaElementAudioSourceNode::create(BaseAudioContext& context, HTMLMediaElement& mediaElement)
{
return new MediaElementAudioSourceNode(context, mediaElement);
}

Powered by Google App Engine
This is Rietveld 408576698