# Getting the bus and then GetChannelGroup returns null

**URL:** <https://qa.fmod.com/t/getting-the-bus-and-then-getchannelgroup-returns-null/17039>\
**Category:** FMOD Engine\
**Tags:** cpp\
**Created:** [April 13, 2021, 5:37am UTC](https://qa.fmod.com/t/getting-the-bus-and-then-getchannelgroup-returns-null/17039 "2021-04-13T05:37:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jblaswu](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jblaswu/32/1117_2.png) [@jblaswu](https://qa.fmod.com/u/jblaswu)\
**Post date:** [April 13, 2021, 5:37am UTC](https://qa.fmod.com/t/getting-the-bus-and-then-getchannelgroup-returns-null/17039/1 "2021-04-13T05:37:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [April 15, 2021, 10:46pm UTC](https://qa.fmod.com/t/getting-the-bus-and-then-getchannelgroup-returns-null/17039/2 "2021-04-15T22:46:18Z")

</div>

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](https://fmod.com/resources/documentation-api?version=2.1&page=studio-guide.html#signal-paths) for details. If the channel group does not exist, this function will return [FMOD\_ERR\_STUDIO\_NOT\_LOADED](https://fmod.com/resources/documentation-api?version=2.1&page=core-api-common.html#fmod_err_studio_not_loaded).

[FMOD - Studio API Reference | Studio::Bus (studio bus getchannelgroup)](https://fmod.com/resources/documentation-api?version=2.1&page=studio-api-bus.html#studio_bus_getchannelgroup)

---

<div class="post-metadata">

**Author:** ![jblaswu](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jblaswu/32/1117_2.png) [@jblaswu](https://qa.fmod.com/u/jblaswu)\
**Post date:** [April 16, 2021, 1:03am UTC](https://qa.fmod.com/t/getting-the-bus-and-then-getchannelgroup-returns-null/17039/3 "2021-04-16T01:03:01Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [April 16, 2021, 1:22am UTC](https://qa.fmod.com/t/getting-the-bus-and-then-getchannelgroup-returns-null/17039/4 "2021-04-16T01:22:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jblaswu](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jblaswu/32/1117_2.png) [@jblaswu](https://qa.fmod.com/u/jblaswu)\
**Post date:** [April 16, 2021, 2:08pm UTC](https://qa.fmod.com/t/getting-the-bus-and-then-getchannelgroup-returns-null/17039/5 "2021-04-16T14:08:53Z")

</div>

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