I’m building an app using FMOD Studio, and I’ve created a bunch of small events, containing only one audio file module. I haven’t changed any settings away from the defaults on either the event or the module on any of these small events.
My assumption was that these events would be one-shot, and only play as long as the single audio module.
What seems to happen, though, is that when I instantiate the event and call eventInstance.start() in my code, the audio loops indefinitely until I call eventInstance.stop().
I can see that an EventDescription has an isOneshot accessor in the API, which would imply that I can set an event to oneshot somewhere in Studio, but I can’t find anything in the UI or the docs.
Am I missing something really obvious here?
Update: I did try immediately releasing the instance after starting it, but still the same looping behaviour.
I have solved my problem, but it’s a really hacky hack:
eventInstance.getChannelGroup( &grp );
grp->getGroup( 0, &sub );
There must be a better way than this? Surely there’s a setting in the Studio UI on a sound module? I can see a little loop button on the Sound item in the Deck when the module’s selected, but whether it’s toggled on or off doesn’t seem to make any difference.
It sounds like you may not be calling System::update(). The Studio API is built on the assumption that your game will call System::update() regularly (usually once per frame). If you are not doing this, you will run into playback issues like the one you describe. If you are calling System::update() regularly, then this is a bug; please let us know and we’ll look into it.
That did the trick, thanks Ben.