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 27 matching lines...) Expand all Loading... |
38 // An AudioNodeInput represents an input to an AudioNode and can be connected fr
om one or more AudioNodeOutputs. | 38 // An AudioNodeInput represents an input to an AudioNode and can be connected fr
om one or more AudioNodeOutputs. |
39 // In the case of multiple connections, the input will act as a unity-gain summi
ng junction, mixing all the outputs. | 39 // In the case of multiple connections, the input will act as a unity-gain summi
ng junction, mixing all the outputs. |
40 // The number of channels of the input's bus is the maximum of the number of cha
nnels of all its connections. | 40 // The number of channels of the input's bus is the maximum of the number of cha
nnels of all its connections. |
41 | 41 |
42 class AudioNodeInput FINAL : public AudioSummingJunction { | 42 class AudioNodeInput FINAL : public AudioSummingJunction { |
43 public: | 43 public: |
44 static PassOwnPtrWillBeRawPtr<AudioNodeInput> create(AudioNode&); | 44 static PassOwnPtrWillBeRawPtr<AudioNodeInput> create(AudioNode&); |
45 | 45 |
46 // AudioSummingJunction | 46 // AudioSummingJunction |
47 virtual void trace(Visitor*) OVERRIDE; | 47 virtual void trace(Visitor*) OVERRIDE; |
48 #if !ENABLE(OILPAN) | 48 virtual bool canUpdateState() OVERRIDE { return !node().isDisposeCalled(); } |
49 virtual bool canUpdateState() OVERRIDE { return !node().isMarkedForDeletion(
); } | |
50 #endif | |
51 virtual void didUpdate() OVERRIDE; | 49 virtual void didUpdate() OVERRIDE; |
52 | 50 |
53 // Can be called from any thread. | 51 // Can be called from any thread. |
54 AudioNode& node() const { return *m_node; } | 52 AudioNode& node() const { return *m_node; } |
55 | 53 |
56 // Must be called with the context's graph lock. | 54 // Must be called with the context's graph lock. |
57 void connect(AudioNodeOutput&); | 55 void connect(AudioNodeOutput&); |
58 void disconnect(AudioNodeOutput&); | 56 void disconnect(AudioNodeOutput&); |
59 | 57 |
60 // disable() will take the output out of the active connections list and set
aside in a disabled list. | 58 // disable() will take the output out of the active connections list and set
aside in a disabled list. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // Called from context's audio thread. | 94 // Called from context's audio thread. |
97 AudioBus* internalSummingBus(); | 95 AudioBus* internalSummingBus(); |
98 void sumAllConnections(AudioBus* summingBus, size_t framesToProcess); | 96 void sumAllConnections(AudioBus* summingBus, size_t framesToProcess); |
99 | 97 |
100 RefPtr<AudioBus> m_internalSummingBus; | 98 RefPtr<AudioBus> m_internalSummingBus; |
101 }; | 99 }; |
102 | 100 |
103 } // namespace blink | 101 } // namespace blink |
104 | 102 |
105 #endif // AudioNodeInput_h | 103 #endif // AudioNodeInput_h |
OLD | NEW |