So I have separate volume controls for various buses in game.
If the player sets volume to zero for voice bus, dsp won’t have anything to process.
What’s the correct setup I should be using here? Should I set up a bus that the user cannot control for raw voice that feeds into one of the controllable ones? Is there a way to hook a DSP directly to the underlying events?
Also, second question - is there a way to automatically collapse multiple channels in the dsp buffer? If I am reading a 5.1 setup from a 2d stereo event, it distributes the two real channels across all the channels - so the array for channel 0 will be 4/6 empty. That’s a lot of wasted processing if I need to manually copy through all that.
Third question:
Working from your example code: https://www.fmod.com/docs/2.02/unity/examples-dsp-capture.html
If I’m getting 2 channel stereo output, but I modify:
// Copy the incoming buffer to process later
int lengthElements = (int)length * inchannels;
Marshal.Copy(inbuffer, obj.mDataBuffer, 0, lengthElements);
// Copy the inbuffer to the outbuffer so we can still hear it
Marshal.Copy(obj.mDataBuffer, 0, outbuffer, lengthElements);
If I modify this so that it only copies length (not length*channels) to outbuffer, instead of only getting audio only from one headphone, I get a very garbled audio in both. What’s happening here?