Closed ramirezd42 closed 6 years ago
Actually the solution I posted would break "stop" functionality.
Just resetting m_endTime back to UnknownTime in AudioScheduledSourceNode::reset() seems to do the trick
void AudioScheduledSourceNode::reset(lab::ContextRenderLock &) {
m_playbackState = UNSCHEDULED_STATE;;
m_endTime = UnknownTime;
}
https://github.com/LabSound/LabSound/pull/92 for reference
Perhaps I'm misinterpreting the purpose of the "reset" function on the AudioScheduledSourceNode. I have a SampledAudioNode that I'm hoping to re-use after playing once. Something like
But this doesn't work because of the following block of code:
Should the conditional not actually be
if (m_endTime != UnknownTime && quantumEndFrame <= quantumStartFrame)
here?