I’ve got a question about EventCategories. Mainly, how are they suppost to be used.
The documentation seems to have very little about them (unless I’ve missed it, which is completely possible).
One of the ideas I see they being used for is global volume control. If the events are setup into say two categories, ‘SFX’ and ‘Music’. Shouldn’t a call to setVolume on the EventCategory, then set all the events that fall under it to that volume? Or am I looking at this all the wrong way? The idea behind the SFX/Music categories is to have it so that the programmers don’t need to know what audio events are music or sound effects, instead leaving it up to the audio designer.
Also, I can’t seem to get them to work if the above is the case. If I take the simple event example, and try to mute, setvolume, etc on an eventcategory. Nothing seems to happen. I am getting a valid category back, since I can query the info and it returns the name correctly.
Any insight to this would be muchly appreicated.
Cheers, and Happy Easter weekend everyone.
- Rigear asked 12 years ago
First I would like to say, what a great job you guys have done with FMOD. It is one of the most feature rich audio solutions I’ve looked at.
Now back to the problem at hand. I’ve been playing around some more with the event system of FMOD, mainly trying to get the EventCategory features to work.
I’ve noticed that a lot of the function calls are returning FMOD_ERR_UNIMPLEMENTED. For example, SetPause and SetMute both return that as error codes.
I am wondering though if SetVolume is implemented? I’ve tried using it in various ways, yet nothing works and the error code that it returns back is FMOD_OK.
Thanks in Advance,
In my own stupidity, I didn’t realize that you couldn’t set the volume on currently playing events. I.E: the looping bkg audio
When I tried it on the SFX Category, voila it does indeed work prefectly.
This does bring up another question. Once the EventCategory::SetPause functionality is implemented, would I be able to use it as a means to call SetVolume on the streaming audio?
SetPause( true );
SetVolume( 0.2f );
SetPause( false );
Where the programmers don’t need to know, or care, what exactly is playing. Only that the volume of those events in the referenced category have had their volumes scaled.
Since this would be done while the application in theory would be paused itself, I am not personally worried about performance issues in regards to using the eventcategory function calls.
Cheers, and thanks
[quote:appajjun]I didn’t realize that you couldn’t set the volume on currently playing events.[/quote:appajjun]
Yes you can. Are you sure you’re changing the volume on the right EventCategory?
SetPause( true );
SetVolume( 0.2f );
SetPause( false ); [/quote:appajjun]
Don’t neeed to pause here, you can just call EventCategory::setVolume() and everything in the category will have its volume scaled by whatever value you specify.
I checked, and I am calling setVolume on the correct Category.
I also tried, moving the music event into the SFX category.
Then on a counter, I scale down the volume of the SFX Category.
The SFX event scales down, the music event doesn’t.
I can send you the fdp and sound banks, and some sample code if you would like?
In your supplied FDP you have the "Music" property set to true on one of your events. Set it to false and your problem will be fixed. That music property really only has relevance for certain console platforms so you can safely ignore it. This will be documented in a future release.
Please login first to submit.