FMOD sound release and pcmreadcallback execution

Having a problem where the pcmreadcallback is still executed after FMOD::sound::release has been called and FMOD::Channel::stop has been called on the channel playing the sound.

Is there anyway to;

  • Synchronously release the sound and channel, waiting for any outstanding queued callbacks to be completed.
  • Guarantee the ordering of release / stop and the callback?

We have a class which wraps a sound and channel and implements the callback (this ptr passed via user data). This behaviour is causing a rare case where the callback is executed after the class has been destroyed.

Are you able to share a reproduction of the issue at all?
I haven’t been able to get that behavior in any tests I have run.