In an application that uses different categories of sound, such as music vs. effects, what is the correct way to maintain a fixed volume for a particular channel?
My application includes a volume control, which is working for background music, but is useless for sound effects. I am guessing that the volume setting is lost each time a new effect is executed with the following procedure:
Call FMOD_Sound_GetSubSound(fmod_SndSound, CLng(Index), fmod_SubSound)
Call FMOD_System_PlaySound(fmod_System, FMOD_CHANNEL_REUSE, fmod_SubSound, True, fmod_ChnSound)
Call FMOD_Channel_SetPaused(fmod_ChnSound, False)[/code:1lqwjrtp]
Anytime the user adjusts the volume control (for sound effects), the following procedure is executed:
[code:1lqwjrtp]Call FMOD_Channel_SetVolume(fmod_ChnSound, Volume)
I have verified that the value of fmod_ChnSound is constant (after the sound effects channel is first created). Must I set the volume value before triggering each effect? Or is there a way to set volume once and forget it?
- stdev asked 13 years ago
[quote:omdoqb34]you will have to provide some code or a better idea of what you are doing[/quote:omdoqb34]
Well, I started this thread with the code that isn’t working.
Channel_SetVolume [b:omdoqb34]is[/b:omdoqb34] working for the music channel; so I don’t presume there is anything wrong with the function, either. Let me know if you spot anything in the above code that might account for this problem. If it helps any, the playback volume for the sound effects is always maximum–regardless of when and how the volume control is altered during game play.
I want to make sure I understand your point…
My application only operates two channels: one for background music and one for sound effects. The application’s volume control has two settings: one to adjust the music volume, and one to adjust the sound effects volume.
Right now, the [b:2zbkkwci]FMOD_Channel_SetVolume[/b:2zbkkwci] function is sufficient to properly adjust music volume. But the function is not having any effect on the sound effects volume.
Are you saying that I should set up a channel group for sound effects, even though there is only ONE channel in that category? Why can’t I change the volume of that sole channel directly?
Please login first to submit.