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 AudioParam; | 44 class AudioParam; |
45 | 45 |
46 typedef int ExceptionCode; | 46 typedef int ExceptionCode; |
47 | 47 |
48 // An AudioNode is the basic building block for handling audio within an AudioCo
ntext. | 48 // An AudioNode is the basic building block for handling audio within an AudioCo
ntext. |
49 // It may be an audio source, an intermediate processing module, or an audio des
tination. | 49 // It may be an audio source, an intermediate processing module, or an audio des
tination. |
50 // Each AudioNode can have inputs and/or outputs. An AudioSourceNode has no inpu
ts and a single output. | 50 // Each AudioNode can have inputs and/or outputs. An AudioSourceNode has no inpu
ts and a single output. |
51 // An AudioDestinationNode has one input and no outputs and represents the final
destination to the audio hardware. | 51 // An AudioDestinationNode has one input and no outputs and represents the final
destination to the audio hardware. |
52 // Most processing nodes such as filters will have one input and one output, alt
hough multiple inputs and outputs are possible. | 52 // Most processing nodes such as filters will have one input and one output, alt
hough multiple inputs and outputs are possible. |
53 | 53 |
54 class AudioNode : public ScriptWrappable, public EventTarget { | 54 class AudioNode : public EventTarget, public ScriptWrappable { |
55 public: | 55 public: |
56 enum { ProcessingSizeInFrames = 128 }; | 56 enum { ProcessingSizeInFrames = 128 }; |
57 | 57 |
58 AudioNode(AudioContext*, float sampleRate); | 58 AudioNode(AudioContext*, float sampleRate); |
59 virtual ~AudioNode(); | 59 virtual ~AudioNode(); |
60 | 60 |
61 AudioContext* context() { return m_context.get(); } | 61 AudioContext* context() { return m_context.get(); } |
62 const AudioContext* context() const { return m_context.get(); } | 62 const AudioContext* context() const { return m_context.get(); } |
63 | 63 |
64 enum NodeType { | 64 enum NodeType { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 231 |
232 protected: | 232 protected: |
233 unsigned m_channelCount; | 233 unsigned m_channelCount; |
234 ChannelCountMode m_channelCountMode; | 234 ChannelCountMode m_channelCountMode; |
235 AudioBus::ChannelInterpretation m_channelInterpretation; | 235 AudioBus::ChannelInterpretation m_channelInterpretation; |
236 }; | 236 }; |
237 | 237 |
238 } // namespace WebCore | 238 } // namespace WebCore |
239 | 239 |
240 #endif // AudioNode_h | 240 #endif // AudioNode_h |
OLD | NEW |