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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class ExceptionState; | 44 class ExceptionState; |
45 | 45 |
46 // An AudioNode is the basic building block for handling audio within an AudioCo
ntext. | 46 // An AudioNode is the basic building block for handling audio within an AudioCo
ntext. |
47 // It may be an audio source, an intermediate processing module, or an audio des
tination. | 47 // It may be an audio source, an intermediate processing module, or an audio des
tination. |
48 // Each AudioNode can have inputs and/or outputs. An AudioSourceNode has no inpu
ts and a single output. | 48 // Each AudioNode can have inputs and/or outputs. An AudioSourceNode has no inpu
ts and a single output. |
49 // An AudioDestinationNode has one input and no outputs and represents the final
destination to the audio hardware. | 49 // An AudioDestinationNode has one input and no outputs and represents the final
destination to the audio hardware. |
50 // Most processing nodes such as filters will have one input and one output, alt
hough multiple inputs and outputs are possible. | 50 // Most processing nodes such as filters will have one input and one output, alt
hough multiple inputs and outputs are possible. |
51 | 51 |
52 class AudioNode : public RefCountedGarbageCollectedWillBeGarbageCollectedFinaliz
ed<AudioNode>, public EventTargetWithInlineData { | 52 class AudioNode : public RefCountedGarbageCollectedWillBeGarbageCollectedFinaliz
ed<AudioNode>, public EventTargetWithInlineData { |
53 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<A
udioNode>); | 53 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<A
udioNode>); |
| 54 DEFINE_WRAPPERTYPEINFO(); |
54 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AudioNode); | 55 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AudioNode); |
55 public: | 56 public: |
56 enum { ProcessingSizeInFrames = 128 }; | 57 enum { ProcessingSizeInFrames = 128 }; |
57 | 58 |
58 AudioNode(AudioContext*, float sampleRate); | 59 AudioNode(AudioContext*, float sampleRate); |
59 virtual ~AudioNode(); | 60 virtual ~AudioNode(); |
60 // dispose() is called just before the destructor. This must be called in | 61 // dispose() is called just before the destructor. This must be called in |
61 // the main thread, and while the graph lock is held. | 62 // the main thread, and while the graph lock is held. |
62 virtual void dispose(); | 63 virtual void dispose(); |
63 static unsigned instanceCount() { return s_instanceCount; } | 64 static unsigned instanceCount() { return s_instanceCount; } |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 221 |
221 protected: | 222 protected: |
222 unsigned m_channelCount; | 223 unsigned m_channelCount; |
223 ChannelCountMode m_channelCountMode; | 224 ChannelCountMode m_channelCountMode; |
224 AudioBus::ChannelInterpretation m_channelInterpretation; | 225 AudioBus::ChannelInterpretation m_channelInterpretation; |
225 }; | 226 }; |
226 | 227 |
227 } // namespace blink | 228 } // namespace blink |
228 | 229 |
229 #endif // AudioNode_h | 230 #endif // AudioNode_h |
OLD | NEW |