| 123 | } |
| 124 | |
| 125 | void SampledAudioNode::setBus(ContextRenderLock& r, std::shared_ptr<AudioBus> sourceBus) |
| 126 | { |
| 127 | // loop count of -3 means set the bus. |
| 128 | _internals->incoming.enqueue({ 0, 0, 0, 0, -3, sourceBus }); |
| 129 | initialize(); |
| 130 | |
| 131 | // set the pending pointer, so that a synchronous call to getBus will reflect |
| 132 | // the value last scheduled. This eliminates a confusing sitatuion where getBus |
| 133 | // will not be useful until the scheduling queue is serviced |
| 134 | m_pendingSourceBus = sourceBus; |
| 135 | } |
| 136 | |
| 137 | void SampledAudioNode::start(float when) |
| 138 | { |