| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 // Returns the maximum numuber of channels we can support. | 299 // Returns the maximum numuber of channels we can support. |
| 300 static unsigned maxNumberOfChannels() { return MaxNumberOfChannels; } | 300 static unsigned maxNumberOfChannels() { return MaxNumberOfChannels; } |
| 301 | 301 |
| 302 // EventTarget | 302 // EventTarget |
| 303 const AtomicString& interfaceName() const final; | 303 const AtomicString& interfaceName() const final; |
| 304 ExecutionContext* getExecutionContext() const final; | 304 ExecutionContext* getExecutionContext() const final; |
| 305 | 305 |
| 306 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); | 306 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| 307 | 307 |
| 308 // Start the AudioContext. `isAllowedToStart()` MUST be called before. | 308 // Start the AudioContext. `isAllowedToStart()` MUST be called |
| 309 // before. This does NOT set the context state to running. The |
| 310 // caller must set the state AFTER calling startRendering. |
| 309 void startRendering(); | 311 void startRendering(); |
| 310 | 312 |
| 311 void notifyStateChange(); | 313 void notifyStateChange(); |
| 312 | 314 |
| 313 // A context is considered closed if: | 315 // A context is considered closed if: |
| 314 // - closeContext() has been called. | 316 // - closeContext() has been called. |
| 315 // - it has been stopped by its execution context. | 317 // - it has been stopped by its execution context. |
| 316 virtual bool isContextClosed() const { return m_isCleared; } | 318 virtual bool isContextClosed() const { return m_isCleared; } |
| 317 | 319 |
| 318 // Get the security origin for this audio context. | 320 // Get the security origin for this audio context. |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 // It is somewhat arbitrary and could be increased if necessary. | 478 // It is somewhat arbitrary and could be increased if necessary. |
| 477 enum { MaxNumberOfChannels = 32 }; | 479 enum { MaxNumberOfChannels = 32 }; |
| 478 | 480 |
| 479 Optional<AutoplayStatus> m_autoplayStatus; | 481 Optional<AutoplayStatus> m_autoplayStatus; |
| 480 AudioIOPosition m_outputPosition; | 482 AudioIOPosition m_outputPosition; |
| 481 }; | 483 }; |
| 482 | 484 |
| 483 } // namespace blink | 485 } // namespace blink |
| 484 | 486 |
| 485 #endif // BaseAudioContext_h | 487 #endif // BaseAudioContext_h |
| OLD | NEW |