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 [b:69q08phr]eventInstance.start()[/b:69q08phr] in my code, the audio loops indefinitely until I call [b:69q08phr]eventInstance.stop()[/b:69q08phr].
I can see that an [b:69q08phr]EventDescription[/b:69q08phr] has an [b:69q08phr]isOneshot[/b:69q08phr] 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?
- prehensile asked 4 years ago
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.
- Guest answered 4 years ago
Please login first to submit.