| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 class WaveShaperNode; | 72 class WaveShaperNode; |
| 73 | 73 |
| 74 // AudioContext is the cornerstone of the web audio API and all AudioNodes are c
reated from it. | 74 // AudioContext is the cornerstone of the web audio API and all AudioNodes are c
reated from it. |
| 75 // For thread safety between the audio thread and the main thread, it has a rend
ering graph locking mechanism. | 75 // For thread safety between the audio thread and the main thread, it has a rend
ering graph locking mechanism. |
| 76 | 76 |
| 77 class AudioContext : public ThreadSafeRefCountedWillBeThreadSafeRefCountedGarbag
eCollected<AudioContext>, public ActiveDOMObject, public ScriptWrappable, public
EventTargetWithInlineData { | 77 class AudioContext : public ThreadSafeRefCountedWillBeThreadSafeRefCountedGarbag
eCollected<AudioContext>, public ActiveDOMObject, public ScriptWrappable, public
EventTargetWithInlineData { |
| 78 DEFINE_EVENT_TARGET_REFCOUNTING(ThreadSafeRefCountedWillBeThreadSafeRefCount
edGarbageCollected<AudioContext>); | 78 DEFINE_EVENT_TARGET_REFCOUNTING(ThreadSafeRefCountedWillBeThreadSafeRefCount
edGarbageCollected<AudioContext>); |
| 79 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AudioContext); | 79 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AudioContext); |
| 80 public: | 80 public: |
| 81 // Create an AudioContext for rendering to the audio hardware. | 81 // Create an AudioContext for rendering to the audio hardware. |
| 82 static PassRefPtrWillBeRawPtr<AudioContext> create(Document&, ExceptionState
&); | 82 static PassRefPtrWillBeRawPtr<AudioContext> create(ExecutionContext*, Except
ionState&); |
| 83 | 83 |
| 84 virtual ~AudioContext(); | 84 virtual ~AudioContext(); |
| 85 | 85 |
| 86 virtual void trace(Visitor*) OVERRIDE; | 86 virtual void trace(Visitor*) OVERRIDE; |
| 87 | 87 |
| 88 bool isInitialized() const { return m_isInitialized; } | 88 bool isInitialized() const { return m_isInitialized; } |
| 89 bool isOfflineContext() { return m_isOfflineContext; } | 89 bool isOfflineContext() { return m_isOfflineContext; } |
| 90 | 90 |
| 91 // Document notification | 91 // Document notification |
| 92 virtual void stop() OVERRIDE FINAL; | 92 virtual void stop() OVERRIDE FINAL; |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 AsyncAudioDecoder m_audioDecoder; | 314 AsyncAudioDecoder m_audioDecoder; |
| 315 | 315 |
| 316 // This is considering 32 is large enough for multiple channels audio. | 316 // This is considering 32 is large enough for multiple channels audio. |
| 317 // It is somewhat arbitrary and could be increased if necessary. | 317 // It is somewhat arbitrary and could be increased if necessary. |
| 318 enum { MaxNumberOfChannels = 32 }; | 318 enum { MaxNumberOfChannels = 32 }; |
| 319 }; | 319 }; |
| 320 | 320 |
| 321 } // WebCore | 321 } // WebCore |
| 322 | 322 |
| 323 #endif // AudioContext_h | 323 #endif // AudioContext_h |
| OLD | NEW |