Hi, I’m making an application that heavily relies on setDelay for synchronization purposes. I’m well into the development process and I need to implement the pause feature of the app.
Pausing channels and channel groups is a very straightforward task, however, there are huge complications when pausing while an instance has been scheduled as the internal DSP clock keeps going. This considerably skews my synchronization.
Do you have ideas on how to solve this problem?
- fredsifu asked 9 years ago
We don’t currently have plans to support pausing the DSP clock.
I have added an example of sample-accurate sequencing with setDelay to the wiki at [url:1iknv4dj]http://www.fmod.org/wiki/index.php5?title=Sample-accurate_sequencing_with_setDelay[/url:1iknv4dj]. The SoundManager::setPaused function provides an example of how to manage pausing and unpausing.
- Guest answered 8 years ago
I’ve implemented a pause system that uses DSPCLOCK delays as well. I was stopping all playing sounds, saving the play position and then setting the positions back to the saved positions when unpausing. As of late this hasn’t been working as setPosition() doesn’t seem to get respected when starting a sample using a DSPCLOCK delay. It’s always starting from the beginning.
I switched over to use the example that Ben posted but the part that’s not working for me is this line:
I’ve made this call to PAUSE the channel in the future (I’ve checked that it is indeed on a DSPCLOCK tick that is in the future) and it never ends up pausing the channel. The DSPCLOCK timer just rolls by and keeps playing. Did you get the same result?
- dgog answered 8 years ago
Please login first to submit.