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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 } | 283 } |
284 // | 284 // |
285 // Thread Safety and Graph Locking: | 285 // Thread Safety and Graph Locking: |
286 // | 286 // |
287 // The following functions call corresponding functions of | 287 // The following functions call corresponding functions of |
288 // DeferredTaskHandler. | 288 // DeferredTaskHandler. |
289 bool isAudioThread() const { return deferredTaskHandler().isAudioThread(); } | 289 bool isAudioThread() const { return deferredTaskHandler().isAudioThread(); } |
290 void lock() { deferredTaskHandler().lock(); } | 290 void lock() { deferredTaskHandler().lock(); } |
291 bool tryLock() { return deferredTaskHandler().tryLock(); } | 291 bool tryLock() { return deferredTaskHandler().tryLock(); } |
292 void unlock() { deferredTaskHandler().unlock(); } | 292 void unlock() { deferredTaskHandler().unlock(); } |
293 #if DCHECK_IS_ON() | 293 |
294 // Returns true if this thread owns the context's lock. | 294 // Returns true if this thread owns the context's lock. |
295 bool isGraphOwner() { return deferredTaskHandler().isGraphOwner(); } | 295 bool isGraphOwner() { return deferredTaskHandler().isGraphOwner(); } |
296 #endif | 296 |
297 using AutoLocker = DeferredTaskHandler::AutoLocker; | 297 using AutoLocker = DeferredTaskHandler::AutoLocker; |
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); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 // It is somewhat arbitrary and could be increased if necessary. | 478 // It is somewhat arbitrary and could be increased if necessary. |
479 enum { MaxNumberOfChannels = 32 }; | 479 enum { MaxNumberOfChannels = 32 }; |
480 | 480 |
481 Optional<AutoplayStatus> m_autoplayStatus; | 481 Optional<AutoplayStatus> m_autoplayStatus; |
482 AudioIOPosition m_outputPosition; | 482 AudioIOPosition m_outputPosition; |
483 }; | 483 }; |
484 | 484 |
485 } // namespace blink | 485 } // namespace blink |
486 | 486 |
487 #endif // BaseAudioContext_h | 487 #endif // BaseAudioContext_h |
OLD | NEW |