I have an audio script that works very similarly to StudioEventEmitter oneShot, the flow basically goes like this:
- Call Play
- This starts an audio instance1
- Call play again (really quickly, even same frame possible)
- Audio instance1 gets all handles released and is just left to finish and play out on its own. Audio instance2 gets created and is started.
- Audio instance2 is not playing because of Cooldown restrictions
- Any variable changes now get directed to instance2, so any variable changes get applied to the sound that is not playing.
There are other solutions to this, but the simplest and most elegant one would be for me to create instance2 and try to launch it before dropping all the handles of instance1 and then if instance2 launch is not possible because of Cooldown, retain instance1. But calling start on instance2 returns FMOD.RESULT OK. Is there a way to check for this?