Playing sounds on existing Bus

Hey there,

We’re having an issue with a rework we’re doing to our voice chat system that’s playing programmatically created sounds. We have a system in place that’s creating sounds, feeding data, and playing them directly (no group). That system does work.

We’re trying to expand it to add some effects and more control, and we built a small proof of concept by adding them to a programmatically created ChannelGroup with DSPs, and that does work as well.

The last step in our journey is where we start to have issue. We are trying to play them on ChannelGroups made from Studio, associated to buses. What we’re doing in code is:

  • getBus(path)
  • bus.lockChannelGroup()
  • flushCommands to ensure channel creation right away

Then we’re creating our sounds, and playing them with the bus’ channel as a parameter.

I’ve added a small recursive routine in code to debug all channel groups and make sure they are indeed created after flushCommands, and they do. The volumes are set to 1, they are not paused either.

Unfortunately, we get no sound out of those channel groups, and see nothing moving in studio when attached, so we must be missing one step, but we can’t figure out what exactly. One hint maybe (not sure), is that the voice channel groups reports isPlaying = true, but the parent channel (master) reports isPlaying = false even though it’s clearly playing our game music.

Any help or idea would be greatly appreciated!

Found the issue, it was a stupid mistake in my user code. The above procedure seems to work perfectly. Thanks!