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

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

Issue 1557363002: Remove the WEB_AUDIO compile time flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/webaudio/AudioContext.h" 5 #include "modules/webaudio/AudioContext.h"
6 6
7 #include "bindings/core/v8/ExceptionMessages.h" 7 #include "bindings/core/v8/ExceptionMessages.h"
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
11 #include "core/dom/ExceptionCode.h" 11 #include "core/dom/ExceptionCode.h"
12 #include "platform/audio/AudioUtilities.h" 12 #include "platform/audio/AudioUtilities.h"
13 13
14 #if DEBUG_AUDIONODE_REFERENCES 14 #if DEBUG_AUDIONODE_REFERENCES
15 #include <stdio.h> 15 #include <stdio.h>
16 #endif 16 #endif
17 17
18 #if ENABLE(WEB_AUDIO)
19
20 namespace blink { 18 namespace blink {
21 19
22 // Don't allow more than this number of simultaneous AudioContexts 20 // Don't allow more than this number of simultaneous AudioContexts
23 // talking to hardware. 21 // talking to hardware.
24 const unsigned MaxHardwareContexts = 6; 22 const unsigned MaxHardwareContexts = 6;
25 static unsigned s_hardwareContextCount = 0; 23 static unsigned s_hardwareContextCount = 0;
26 static unsigned s_contextId = 0; 24 static unsigned s_contextId = 0;
27 25
28 AbstractAudioContext* AudioContext::create(Document& document, ExceptionState& e xceptionState) 26 AbstractAudioContext* AudioContext::create(Document& document, ExceptionState& e xceptionState)
29 { 27 {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 188
191 if (contextState() == Running) { 189 if (contextState() == Running) {
192 destination()->audioDestinationHandler().stopRendering(); 190 destination()->audioDestinationHandler().stopRendering();
193 setContextState(Suspended); 191 setContextState(Suspended);
194 deferredTaskHandler().clearHandlersToBeDeleted(); 192 deferredTaskHandler().clearHandlersToBeDeleted();
195 } 193 }
196 } 194 }
197 195
198 } // namespace blink 196 } // namespace blink
199 197
200 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioContext.h ('k') | third_party/WebKit/Source/modules/webaudio/AudioContext.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698