I have a need to play a stream an unknown number of times, restarting it at different markers or letting it play to the end. I’ve added tags to the WAV and I get the callback set by FSOUND_Stream_SetSynchCallback, but I cannot do anything to the stream in the callback. What I need to do is check certain conditions in the callback and move the playback point, stop the playback, or let it continue. I’ve tried setting states in the callback and polling, but it isn’t fast enough (sound can complete before the check or played too far before restarting the loop).
I’ve also looked at the loop points but this doesn’t let me do what I need; I have more than just loop start/end to deal with.