| 135 | } |
| 136 | |
| 137 | void SampledAudioNode::start(float when) |
| 138 | { |
| 139 | std::shared_ptr<AudioBus> bus = m_pendingSourceBus; |
| 140 | if (!bus) |
| 141 | return; |
| 142 | |
| 143 | auto ac = _internals->ac.lock(); |
| 144 | if (!ac) |
| 145 | return; |
| 146 | |
| 147 | when = static_cast<float>(when - ac->currentTime()); |
| 148 | |
| 149 | if (!isPlayingOrScheduled()) |
| 150 | _scheduler.start(0.); |
| 151 | |
| 152 | _internals->incoming.enqueue({when, 0, bus->length(), 0, 0}); |
| 153 | initialize(); |
| 154 | } |
| 155 | |
| 156 | void SampledAudioNode::start(float when, int loopCount) |
| 157 | { |
no test coverage detected