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

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

Issue 1911133002: Remove connection from AudioParamHandler to AudioContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and Rename 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
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp
index be242483b7738a578b20925345fa49205d00b2dd..dccad80e12fdd84d0c59ea1ce547b2d85d1b0029 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp
@@ -302,13 +302,11 @@ void AudioParamTimeline::cancelScheduledValues(double startTime, ExceptionState&
}
}
-float AudioParamTimeline::valueForContextTime(AbstractAudioContext* context, float defaultValue, bool& hasValue)
+float AudioParamTimeline::valueForContextTime(AudioDestinationHandler& audioDestination, float defaultValue, bool& hasValue)
{
- ASSERT(context);
-
{
MutexTryLocker tryLocker(m_eventsLock);
- if (!tryLocker.locked() || !context || !m_events.size() || context->currentTime() < m_events[0].time()) {
+ if (!tryLocker.locked() || !m_events.size() || audioDestination.currentTime() < m_events[0].time()) {
hasValue = false;
return defaultValue;
}
@@ -316,8 +314,8 @@ float AudioParamTimeline::valueForContextTime(AbstractAudioContext* context, flo
// Ask for just a single value.
float value;
- double sampleRate = context->sampleRate();
- size_t startFrame = context->currentSampleFrame();
+ double sampleRate = audioDestination.sampleRate();
+ size_t startFrame = audioDestination.currentSampleFrame();
double controlRate = sampleRate / AudioHandler::ProcessingSizeInFrames; // one parameter change per render quantum
value = valuesForFrameRange(startFrame, startFrame + 1, defaultValue, &value, 1, sampleRate, controlRate);
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698