I’m working on a project where I run all the sounds through the Fmod Studio. However there is a text-to-speech (TTS) feature that is received from the server in a raw pcm format. I need to run the TTS audio through FMOD, so I can disable the Unity Audio Driver.
I also want to run it through the Channel Group (bus) which I already established in the Fmod Studio. That is necessary, so I can do ducking with a sidechain compression, apply VCA and further processing…
I guess the right approach is to do it through the core api by the createSound function with the use of FMOD_OPENRAW. I only need to specify the sampling rate, PCM format and number of channels.
But how do I send it into the dedicated group channel? I’ve only found the ChannelGroup::getGroup function that requires an index (int). How do I know what index does it have? Am I not mistaking the bus in Studio API with the GroupChannel in the Core API? Are those two the same thing?
Not exactly, an FMOD Engine | Core API Reference - ChannelGroup is like a FMOD Engine | Studio API reference - Bus, while a bus is not like a channelgroup. However, we can use our bus to access the channelgroup we want to play our sound on without having to worry about the index of the channelgroup. I have an example of accessing a specific Bus in Unity here: Audio Stream to programmer instrument - #4 by Connor_FMOD, hopefully this is what you are looking for.
I was lucky enough to find that post yesterday and I successfully implemented it.
It was also interesting that the CoreAPI ChannelGroup wasn’t affected by the StudioAPI MasterBus VCA. Which means that this master isn’t an ultimate master of the whole signal chain. Is that on purpose? Is there any schematic that describes the signal chain of the Studio and Core API?
That’s good to hear!
I am not sure which channel group you are referencing here. Could you please elaborate on what you are trying to do?
If you want to be able to see your signal chain in real time you can use the FMOD Engine | Core API Reference - Core API Profiler. The profiler works the same and Live Update but focused on the DSP graph.
To enable the core API profiler add FMOD Engine | Core API Reference - FMOD_INIT_PROFILE_ENABLE to line
349 in the
result = studioSystem.initialize(virtualChannels, studioInitFlags, FMOD.INITFLAGS.NORMAL | FMOD.INITFLAGS.PROFILE_ENABLE, IntPtr.Zero);
Hope this helps!