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 23 matching lines...) Loading... |
34 #include "wtf/Vector.h" | 34 #include "wtf/Vector.h" |
35 #include "wtf/build_config.h" | 35 #include "wtf/build_config.h" |
36 #include <memory> | 36 #include <memory> |
37 | 37 |
38 #define DEBUG_AUDIONODE_REFERENCES 0 | 38 #define DEBUG_AUDIONODE_REFERENCES 0 |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class BaseAudioContext; | 42 class BaseAudioContext; |
43 class AudioNode; | 43 class AudioNode; |
| 44 class AudioNodeOptions; |
44 class AudioNodeInput; | 45 class AudioNodeInput; |
45 class AudioNodeOutput; | 46 class AudioNodeOutput; |
46 class AudioParam; | 47 class AudioParam; |
47 class ExceptionState; | 48 class ExceptionState; |
48 | 49 |
49 // An AudioNode is the basic building block for handling audio within an BaseAud
ioContext. | 50 // An AudioNode is the basic building block for handling audio within an BaseAud
ioContext. |
50 // It may be an audio source, an intermediate processing module, or an audio des
tination. | 51 // It may be an audio source, an intermediate processing module, or an audio des
tination. |
51 // Each AudioNode can have inputs and/or outputs. An AudioSourceNode has no inpu
ts and a single output. | 52 // Each AudioNode can have inputs and/or outputs. An AudioSourceNode has no inpu
ts and a single output. |
52 // An AudioDestinationNode has one input and no outputs and represents the final
destination to the audio hardware. | 53 // An AudioDestinationNode has one input and no outputs and represents the final
destination to the audio hardware. |
53 // Most processing nodes such as filters will have one input and one output, alt
hough multiple inputs and outputs are possible. | 54 // Most processing nodes such as filters will have one input and one output, alt
hough multiple inputs and outputs are possible. |
(...skipping 232 matching lines...) Loading... |
286 | 287 |
287 }; | 288 }; |
288 | 289 |
289 class MODULES_EXPORT AudioNode : public EventTargetWithInlineData { | 290 class MODULES_EXPORT AudioNode : public EventTargetWithInlineData { |
290 DEFINE_WRAPPERTYPEINFO(); | 291 DEFINE_WRAPPERTYPEINFO(); |
291 USING_PRE_FINALIZER(AudioNode, dispose); | 292 USING_PRE_FINALIZER(AudioNode, dispose); |
292 public: | 293 public: |
293 DECLARE_VIRTUAL_TRACE(); | 294 DECLARE_VIRTUAL_TRACE(); |
294 AudioHandler& handler() const; | 295 AudioHandler& handler() const; |
295 | 296 |
| 297 void handleChannelOptions(const AudioNodeOptions&, ExceptionState&); |
| 298 |
296 virtual AudioNode* connect(AudioNode*, unsigned outputIndex, unsigned inputI
ndex, ExceptionState&); | 299 virtual AudioNode* connect(AudioNode*, unsigned outputIndex, unsigned inputI
ndex, ExceptionState&); |
297 void connect(AudioParam*, unsigned outputIndex, ExceptionState&); | 300 void connect(AudioParam*, unsigned outputIndex, ExceptionState&); |
298 void disconnect(); | 301 void disconnect(); |
299 virtual void disconnect(unsigned outputIndex, ExceptionState&); | 302 virtual void disconnect(unsigned outputIndex, ExceptionState&); |
300 void disconnect(AudioNode*, ExceptionState&); | 303 void disconnect(AudioNode*, ExceptionState&); |
301 void disconnect(AudioNode*, unsigned outputIndex, ExceptionState&); | 304 void disconnect(AudioNode*, unsigned outputIndex, ExceptionState&); |
302 void disconnect(AudioNode*, unsigned outputIndex, unsigned inputIndex, Excep
tionState&); | 305 void disconnect(AudioNode*, unsigned outputIndex, unsigned inputIndex, Excep
tionState&); |
303 void disconnect(AudioParam*, ExceptionState&); | 306 void disconnect(AudioParam*, ExceptionState&); |
304 void disconnect(AudioParam*, unsigned outputIndex, ExceptionState&); | 307 void disconnect(AudioParam*, unsigned outputIndex, ExceptionState&); |
305 BaseAudioContext* context() const; | 308 BaseAudioContext* context() const; |
(...skipping 37 matching lines...) Loading... |
343 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes; | 346 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes; |
344 // Represents audio node graph with Oilpan references. N-th HeapHashSet | 347 // Represents audio node graph with Oilpan references. N-th HeapHashSet |
345 // represents a set of AudioParam objects connected to this AudioNode's N-th | 348 // represents a set of AudioParam objects connected to this AudioNode's N-th |
346 // output. | 349 // output. |
347 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams; | 350 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams; |
348 }; | 351 }; |
349 | 352 |
350 } // namespace blink | 353 } // namespace blink |
351 | 354 |
352 #endif // AudioNode_h | 355 #endif // AudioNode_h |
OLD | NEW |