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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.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/AudioBufferSourceNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
index fee8a9669022631884555c23ce859deb811bb6be..9e5c68c93ba77dd4a53f8baccb56ff011682aafb 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
@@ -27,8 +27,8 @@
#include "bindings/core/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
#include "core/frame/UseCounter.h"
-#include "modules/webaudio/AbstractAudioContext.h"
#include "modules/webaudio/AudioNodeOutput.h"
+#include "modules/webaudio/BaseAudioContext.h"
#include "platform/FloatConversion.h"
#include "platform/audio/AudioUtilities.h"
#include "wtf/MathExtras.h"
@@ -343,7 +343,7 @@ void AudioBufferSourceHandler::setBuffer(AudioBuffer* buffer, ExceptionState& ex
}
// The context must be locked since changing the buffer can re-configure the number of channels that are output.
- AbstractAudioContext::AutoLocker contextLocker(context());
+ BaseAudioContext::AutoLocker contextLocker(context());
// This synchronizes with process().
MutexLocker processLocker(m_processLock);
@@ -354,7 +354,7 @@ void AudioBufferSourceHandler::setBuffer(AudioBuffer* buffer, ExceptionState& ex
// This should not be possible since AudioBuffers can't be created with too many channels
// either.
- if (numberOfChannels > AbstractAudioContext::maxNumberOfChannels()) {
+ if (numberOfChannels > BaseAudioContext::maxNumberOfChannels()) {
exceptionState.throwDOMException(
NotSupportedError,
ExceptionMessages::indexOutsideRange(
@@ -362,7 +362,7 @@ void AudioBufferSourceHandler::setBuffer(AudioBuffer* buffer, ExceptionState& ex
numberOfChannels,
1u,
ExceptionMessages::InclusiveBound,
- AbstractAudioContext::maxNumberOfChannels(),
+ BaseAudioContext::maxNumberOfChannels(),
ExceptionMessages::InclusiveBound));
return;
}
@@ -505,9 +505,9 @@ void AudioBufferSourceHandler::startSource(double when, double grainOffset, doub
double AudioBufferSourceHandler::computePlaybackRate()
{
- // Incorporate buffer's sample-rate versus AbstractAudioContext's sample-rate.
+ // Incorporate buffer's sample-rate versus BaseAudioContext's sample-rate.
// Normally it's not an issue because buffers are loaded at the
- // AbstractAudioContext's sample-rate, but we can handle it in any case.
+ // BaseAudioContext's sample-rate, but we can handle it in any case.
double sampleRateFactor = 1.0;
if (buffer()) {
// Use doubles to compute this to full accuracy.
@@ -581,7 +581,7 @@ void AudioBufferSourceHandler::handleStoppableSourceNode()
}
// ----------------------------------------------------------------
-AudioBufferSourceNode::AudioBufferSourceNode(AbstractAudioContext& context, float sampleRate)
+AudioBufferSourceNode::AudioBufferSourceNode(BaseAudioContext& context, float sampleRate)
: AudioScheduledSourceNode(context)
, m_playbackRate(AudioParam::create(context, 1.0))
, m_detune(AudioParam::create(context, 0.0))
@@ -589,7 +589,7 @@ AudioBufferSourceNode::AudioBufferSourceNode(AbstractAudioContext& context, floa
setHandler(AudioBufferSourceHandler::create(*this, sampleRate, m_playbackRate->handler(), m_detune->handler()));
}
-AudioBufferSourceNode* AudioBufferSourceNode::create(AbstractAudioContext& context, float sampleRate)
+AudioBufferSourceNode* AudioBufferSourceNode::create(BaseAudioContext& context, float sampleRate)
{
return new AudioBufferSourceNode(context, sampleRate);
}

Powered by Google App Engine
This is Rietveld 408576698