| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 class PannerNode; | 67 class PannerNode; |
| 68 class PeriodicWave; | 68 class PeriodicWave; |
| 69 class ScriptProcessorNode; | 69 class ScriptProcessorNode; |
| 70 class WaveShaperNode; | 70 class WaveShaperNode; |
| 71 | 71 |
| 72 // AudioContext is the cornerstone of the web audio API and all AudioNodes are c
reated from it. | 72 // AudioContext is the cornerstone of the web audio API and all AudioNodes are c
reated from it. |
| 73 // For thread safety between the audio thread and the main thread, it has a rend
ering graph locking mechanism. | 73 // For thread safety between the audio thread and the main thread, it has a rend
ering graph locking mechanism. |
| 74 | 74 |
| 75 class AudioContext : public RefCountedGarbageCollectedWillBeGarbageCollectedFina
lized<AudioContext>, public ActiveDOMObject, public EventTargetWithInlineData { | 75 class AudioContext : public RefCountedGarbageCollectedWillBeGarbageCollectedFina
lized<AudioContext>, public ActiveDOMObject, public EventTargetWithInlineData { |
| 76 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<A
udioContext>); | 76 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<A
udioContext>); |
| 77 DEFINE_WRAPPERTYPEINFO(); |
| 77 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AudioContext); | 78 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AudioContext); |
| 78 public: | 79 public: |
| 79 // Create an AudioContext for rendering to the audio hardware. | 80 // Create an AudioContext for rendering to the audio hardware. |
| 80 static AudioContext* create(Document&, ExceptionState&); | 81 static AudioContext* create(Document&, ExceptionState&); |
| 81 | 82 |
| 82 virtual ~AudioContext(); | 83 virtual ~AudioContext(); |
| 83 | 84 |
| 84 virtual void trace(Visitor*) OVERRIDE; | 85 virtual void trace(Visitor*) OVERRIDE; |
| 85 | 86 |
| 86 bool isInitialized() const { return m_isInitialized; } | 87 bool isInitialized() const { return m_isInitialized; } |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 AsyncAudioDecoder m_audioDecoder; | 343 AsyncAudioDecoder m_audioDecoder; |
| 343 | 344 |
| 344 // This is considering 32 is large enough for multiple channels audio. | 345 // This is considering 32 is large enough for multiple channels audio. |
| 345 // It is somewhat arbitrary and could be increased if necessary. | 346 // It is somewhat arbitrary and could be increased if necessary. |
| 346 enum { MaxNumberOfChannels = 32 }; | 347 enum { MaxNumberOfChannels = 32 }; |
| 347 }; | 348 }; |
| 348 | 349 |
| 349 } // namespace blink | 350 } // namespace blink |
| 350 | 351 |
| 351 #endif // AudioContext_h | 352 #endif // AudioContext_h |
| OLD | NEW |