Creating sound groups

Hello people, I was wondering if you had any examples for me (in JavaScript) on how to create a SoundGroup. I need it to lower my game volume when sound is already running, so I really do need this.

Thanks in advance!

You will first need to create the SoundGroup (via System), then assign sounds to that group (via Sound), then adjust the volume as needed (via SoundGroup).

But what is “sound” in sound_setsoundgroup?

An FMOD Sound is a container for the audio file you wish to use.

Is your game using the FMOD Core system or are you using an FMOD Studio project? As these would be a different approach.

I’m using FMOD Studio

Also, what does the “adress of the variable” mean? I see it a lot but do not (fully) understand it

Is it possible to do something like this: currentMusic.setVolume(audioLevel) ?

Right now i’m using gSystem.createChannelGroup and it’s not at all working. Can you use functions for FMODL in FMODSTUDIOL? I’m pretty sure it can’t but I’m not entirely sure

If you’re using an FMOD Studio project and calling events in your game, you need to assign those events to group buses in the project. If needed, you can also assign the group buses to VCAs. You can then use setVolume() on the bus or VCA in order to adjust the volume of a bunch of events at once.

It is the location of the variable in memory. This is more of a programming question that I would recommend looking up or asking in a specialty forum.

It depends entirely what the currentMusic variable is. If this is an event or a bus then yes, this is fine.

If gSystem is the FMOD Studio system, then you will need to use gSystem::getCoreSystem to get the FMOD Core system needed to create channel groups.