MCPcopy Create free account
hub / github.com/LabSound/LabSound / start

Method start

src/core/SampledAudioNode.cpp:137–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

scheduleMethod · 0.45

Calls 3

currentTimeMethod · 0.45
lengthMethod · 0.45
sampleRateMethod · 0.45

Tested by

no test coverage detected