Getting the bus and then GetChannelGroup returns null

I created a group on the mixer (called TestGroup). Then i attempted doing the following:

FMOD::Studio::Bus* bus;
StudioSystem->getBus( “bus:/TestGroup”, &bus );
bus->getChannelGroup( &testGroup );

bus is not null so that means something, but testGroup returns null. My final objective is to assign a played sound thru c++ into a specific channel group that can be controlled with FMOD Studio.
I’m feeling this is a matter of fmod concept i don’t quite understand but can’t point my finger at. Tried looking for documentation about this but nothing was found. Help will be appreciated.

All the FMOD API functions return an FMOD_RESULT, you can check these for more information when a function doesn’t appear to do what you are expecting.

By default the channel group will only exist when it is needed; see Signal Paths for details. If the channel group does not exist, this function will return FMOD_ERR_STUDIO_NOT_LOADED.

FMOD - Studio API Reference | Studio::Bus (studio bus getchannelgroup)

Thanks for the help. What i am trying to attempt is put a stream that is executed with PlaySound into a channel or group or bus or anything that is affected by variables in FMOD. That way we want to be able to still control this stream (we basically want to be able to have the same level of control that we get from regular events but with playsound streams)

It would be best to use a ‘programmer sound’ for that rather than digging into the Channels of a bus, this will allow you to pass a Core API sound into a Studio Event and have it handled by the Studio API.

We include a programmer sound example in the API download.

Thanks, that’s a great suggestion, will try that and look into the example. Thanks!

1 Like