FMOD Limiting Instances

Started by
1 comment, last by UtMan88 14 years, 10 months ago
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.
Keith M. Programming - My Game Dev Blog.
Tutorials. Games. Code Snippets. Bad Jokes. I got 'em all.

Follow me on Twitter. [twitter]KeithMaggio[/twitter]
Listen to me yap about programming and games and junk.
Advertisement
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!

Nathan Madsen
Nate (AT) MadsenStudios (DOT) Com
Composer-Sound Designer
Madsen Studios
Austin, TX

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.
Keith M. Programming - My Game Dev Blog.
Tutorials. Games. Code Snippets. Bad Jokes. I got 'em all.

Follow me on Twitter. [twitter]KeithMaggio[/twitter]
Listen to me yap about programming and games and junk.

This topic is closed to new replies.

Advertisement