Sign in to follow this  
UtMan88

FMOD Limiting Instances

Recommended Posts

Hey guys, I was in a talk with my sound guy, and he told me to limit a sound instance, so that sound would only play so many times. I've been looking at the FMOD Ex API documentation, google, and I found nothing to help. How can I pull this off? I'm not using Event Groups at all, and when i play a sound, i get back the channel and store it in a list, which every 5 seconds into the game i clear out bad channels by checking the FMOD_RESULT of isPlaying() to see if they == FMOD_ERR_INVALID_HANDLE. Help will be greatly appreciated.

Share this post


Link to post
Share on other sites
The first thing that comes to my mind is adjusting the max playback parameter to the needed limit. This would cause any playbacks larger than that parameter not to play. You can do that within designer under the event details.

This sort of thing is usually taken care of by the sound designer and not the programmer, since the designer application is closely tied to sound asset assignment.

If that doesn't help, then sorry!

Share this post


Link to post
Share on other sites
I appreciate the help, unfortunately I'm not using the designer, and this is for a project at Full Sail. Normally, I suppose this would be handled by a sound designer. Alas, we have no such luxury :- P.

An idea would be to loop through every sound that I'm storing in my vector, and testing each channel to see if it was playing. If a sound already has a "max" amount of channels playing the sound, then don't play any more, but i feel that would be more processing than necessary, plus it sounds more of a hack than a solution.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this