Hi there, I’m new to FMOD and sound programming in general and I thought I’d post to see if anyone had any ideas about how to change the volume of sound effects and background music separately.
Right now I have a class that contains all of my background music and I just call a function when I want the music to change from one to another. Since there is only one I can adjust the volume very easily using the FSOUND_SetVolume() function to change the volume of the specific channel. This works fine with BGM’s because I only want one playing at a time. However, I’m sort of at a loss as to what I should do with SFX because I have several open all at once.
I’m worried that if I create a class containing all of the SFX and I load them all at once I won’t have enough channels for all of the sounds I need for my game application. I tried using FSOUND_SetSFXMasterVolume() but I found out later that it affects the streams too.
Does anyone have a suggestion for how to handle this problem I am having? Thank you in advance for your help.
- halfskye asked 13 years ago
Hi there again,
I was having trouble with the way I wrote the volume adjustments with FSOUND_SetVolumeAbsolute() and FSOUND_ALL so I reverted back to the way you had originally suggested and I don’t seem to be having that weird noise problem anymore with lower values for SFXSetMasterVolume(). I’m not sure what I was doing on that one. But it seems to be working great now (I know I said that last time but it’s looking good 😉 ). Thank you again for your patience in helping me with this.
Thank you for your help. I ended up using FSOUND_SetVolumeAbsolute(FSOUND_ALL, Volume) to set the volume of all of the sound effects and then called FSOUND_SetVolumeAbsolute on the BGM to set its volume separately. I was getting a weird noise when I called the SetSFXMasterVolume function with lower values followed by the FSOUND_SetVolumeAbsolute function on the BGM.
So my application seems to be working great now. Thank you again for your help
Please login first to submit.