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