I might make a fool of my self now, but there is something I don’t understand with AudioTransportSource
I get it to play, stop, etc, and all seems well.
But when I call void AudioTransportSource::stop() it blocks the calling thread:
int n = 500; while (--n >= 0 && ! stopped) Thread::sleep (2);
What I want to do is to have it stop, both on user input (like a button click) or to stop at a given time (counting samples in the processing callback)
Anyway it will block, if I call it from the message thread, it will lock the app for a while, if I call it from the processing thread, it will block audio.
Do I need to create my own thread, only for stopping the AudioTransportSource ? I’m guessing I have missed a critical point here