| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 inline AudioNodeInput::AudioNodeInput(AudioHandler& handler) | 34 inline AudioNodeInput::AudioNodeInput(AudioHandler& handler) |
| 35 : AudioSummingJunction(handler.context()->deferredTaskHandler()), | 35 : AudioSummingJunction(handler.context()->deferredTaskHandler()), |
| 36 m_handler(handler) { | 36 m_handler(handler) { |
| 37 // Set to mono by default. | 37 // Set to mono by default. |
| 38 m_internalSummingBus = | 38 m_internalSummingBus = |
| 39 AudioBus::create(1, AudioUtilities::kRenderQuantumFrames); | 39 AudioBus::create(1, AudioUtilities::kRenderQuantumFrames); |
| 40 } | 40 } |
| 41 | 41 |
| 42 std::unique_ptr<AudioNodeInput> AudioNodeInput::create(AudioHandler& handler) { | 42 std::unique_ptr<AudioNodeInput> AudioNodeInput::create(AudioHandler& handler) { |
| 43 return wrapUnique(new AudioNodeInput(handler)); | 43 return WTF::wrapUnique(new AudioNodeInput(handler)); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void AudioNodeInput::connect(AudioNodeOutput& output) { | 46 void AudioNodeInput::connect(AudioNodeOutput& output) { |
| 47 ASSERT(deferredTaskHandler().isGraphOwner()); | 47 ASSERT(deferredTaskHandler().isGraphOwner()); |
| 48 | 48 |
| 49 // Check if we're already connected to this output. | 49 // Check if we're already connected to this output. |
| 50 if (m_outputs.contains(&output)) | 50 if (m_outputs.contains(&output)) |
| 51 return; | 51 return; |
| 52 | 52 |
| 53 output.addInput(*this); | 53 output.addInput(*this); |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 return internalSummingBus; | 216 return internalSummingBus; |
| 217 } | 217 } |
| 218 | 218 |
| 219 // Handle multiple connections case. | 219 // Handle multiple connections case. |
| 220 sumAllConnections(internalSummingBus, framesToProcess); | 220 sumAllConnections(internalSummingBus, framesToProcess); |
| 221 | 221 |
| 222 return internalSummingBus; | 222 return internalSummingBus; |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace blink | 225 } // namespace blink |
| OLD | NEW |