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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp

Issue 1820403002: Implement Automations for PannerNode and AutioListener (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test because CL for min/maxValue AudioParam landed 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) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 12 matching lines...) Expand all
23 */ 23 */
24 24
25 #include "modules/webaudio/OfflineAudioContext.h" 25 #include "modules/webaudio/OfflineAudioContext.h"
26 #include "bindings/core/v8/ExceptionMessages.h" 26 #include "bindings/core/v8/ExceptionMessages.h"
27 #include "bindings/core/v8/ExceptionState.h" 27 #include "bindings/core/v8/ExceptionState.h"
28 #include "bindings/core/v8/ScriptState.h" 28 #include "bindings/core/v8/ScriptState.h"
29 #include "core/dom/DOMException.h" 29 #include "core/dom/DOMException.h"
30 #include "core/dom/Document.h" 30 #include "core/dom/Document.h"
31 #include "core/dom/ExceptionCode.h" 31 #include "core/dom/ExceptionCode.h"
32 #include "core/dom/ExecutionContext.h" 32 #include "core/dom/ExecutionContext.h"
33 #include "modules/webaudio/AudioListener.h"
33 #include "modules/webaudio/DeferredTaskHandler.h" 34 #include "modules/webaudio/DeferredTaskHandler.h"
34 #include "modules/webaudio/OfflineAudioCompletionEvent.h" 35 #include "modules/webaudio/OfflineAudioCompletionEvent.h"
35 #include "modules/webaudio/OfflineAudioDestinationNode.h" 36 #include "modules/webaudio/OfflineAudioDestinationNode.h"
36 37
37 #include "platform/audio/AudioUtilities.h" 38 #include "platform/audio/AudioUtilities.h"
38 39
39 namespace blink { 40 namespace blink {
40 41
41 OfflineAudioContext* OfflineAudioContext::create(ExecutionContext* context, unsi gned numberOfChannels, unsigned numberOfFrames, float sampleRate, ExceptionState & exceptionState) 42 OfflineAudioContext* OfflineAudioContext::create(ExecutionContext* context, unsi gned numberOfChannels, unsigned numberOfFrames, float sampleRate, ExceptionState & exceptionState)
42 { 43 {
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 330
330 bool OfflineAudioContext::handlePreOfflineRenderTasks() 331 bool OfflineAudioContext::handlePreOfflineRenderTasks()
331 { 332 {
332 ASSERT(isAudioThread()); 333 ASSERT(isAudioThread());
333 334
334 // OfflineGraphAutoLocker here locks the audio graph for this scope. Note 335 // OfflineGraphAutoLocker here locks the audio graph for this scope. Note
335 // that this locker does not use tryLock() inside because the timing of 336 // that this locker does not use tryLock() inside because the timing of
336 // suspension MUST NOT be delayed. 337 // suspension MUST NOT be delayed.
337 OfflineGraphAutoLocker locker(this); 338 OfflineGraphAutoLocker locker(this);
338 339
340 // Update the dirty state of the listener.
341 listener()->updateState();
342
339 deferredTaskHandler().handleDeferredTasks(); 343 deferredTaskHandler().handleDeferredTasks();
340 handleStoppableSourceNodes(); 344 handleStoppableSourceNodes();
341 345
342 return shouldSuspend(); 346 return shouldSuspend();
343 } 347 }
344 348
345 void OfflineAudioContext::handlePostOfflineRenderTasks() 349 void OfflineAudioContext::handlePostOfflineRenderTasks()
346 { 350 {
347 ASSERT(isAudioThread()); 351 ASSERT(isAudioThread());
348 352
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 // Note that the GraphLock is required before this check. Since this needs 416 // Note that the GraphLock is required before this check. Since this needs
413 // to run on the audio thread, OfflineGraphAutoLocker must be used. 417 // to run on the audio thread, OfflineGraphAutoLocker must be used.
414 if (m_scheduledSuspends.contains(currentSampleFrame())) 418 if (m_scheduledSuspends.contains(currentSampleFrame()))
415 return true; 419 return true;
416 420
417 return false; 421 return false;
418 } 422 }
419 423
420 } // namespace blink 424 } // namespace blink
421 425
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioParam.cpp ('k') | third_party/WebKit/Source/modules/webaudio/PannerNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698