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

Side by Side 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: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 // Remove all events starting at startTime. 296 // Remove all events starting at startTime.
297 for (unsigned i = 0; i < m_events.size(); ++i) { 297 for (unsigned i = 0; i < m_events.size(); ++i) {
298 if (m_events[i].time() >= startTime) { 298 if (m_events[i].time() >= startTime) {
299 m_events.remove(i, m_events.size() - i); 299 m_events.remove(i, m_events.size() - i);
300 break; 300 break;
301 } 301 }
302 } 302 }
303 } 303 }
304 304
305 float AudioParamTimeline::valueForContextTime(AbstractAudioContext* context, flo at defaultValue, bool& hasValue) 305 float AudioParamTimeline::valueForContextTime(AudioDestinationHandler* context, float defaultValue, bool& hasValue)
hongchan 2016/04/25 16:58:18 context => destinationHandler
Raymond Toy 2016/04/26 16:37:42 audioDestination instead of destinationHandler.
306 { 306 {
307 ASSERT(context); 307 ASSERT(context);
hongchan 2016/04/25 16:58:18 Ditto from here and on.
Raymond Toy 2016/04/26 16:37:42 Done.
308 308
309 { 309 {
310 MutexTryLocker tryLocker(m_eventsLock); 310 MutexTryLocker tryLocker(m_eventsLock);
311 if (!tryLocker.locked() || !context || !m_events.size() || context->curr entTime() < m_events[0].time()) { 311 if (!tryLocker.locked() || !context || !m_events.size() || context->curr entTime() < m_events[0].time()) {
312 hasValue = false; 312 hasValue = false;
313 return defaultValue; 313 return defaultValue;
314 } 314 }
315 } 315 }
316 316
317 // Ask for just a single value. 317 // Ask for just a single value.
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 for (; writeIndex < numberOfValues; ++writeIndex) 815 for (; writeIndex < numberOfValues; ++writeIndex)
816 values[writeIndex] = value; 816 values[writeIndex] = value;
817 817
818 // This value is used to set the .value attribute of the AudioParam. it sho uld be the last 818 // This value is used to set the .value attribute of the AudioParam. it sho uld be the last
819 // computed value. 819 // computed value.
820 return values[numberOfValues - 1]; 820 return values[numberOfValues - 1];
821 } 821 }
822 822
823 } // namespace blink 823 } // namespace blink
824 824
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698