Can not get a DSPConnection from the Compressor DSP in Master Channel Group

Hi Guys,

After we upgraded FMOD api to FMOD Studio 1.09.06, we have some issue about it. I created a Compressor DSP and added it to Master Channel Group, but I failed to get the DSPConnection with the codes below, the result always be FMOD_ERR_DSP_NOTFOUND, the codes work fine in old FMOD api, do you have any ideas about this?

result = system->getMasterChannelGroup(&masterGroup);
ERRCHECK(result);

FMOD::DSP*          m_CompressorDSP;

result = system->createDSPByType(FMOD_DSP_TYPE_COMPRESSOR, &m_CompressorDSP);
ERRCHECK(result);

result = masterGroup->addDSP(FMOD_CHANNELCONTROL_DSP_HEAD, m_CompressorDSP);

FMOD::DSP * dsphead;
result = masterGroup->getDSP(FMOD_CHANNELCONTROL_DSP_HEAD, &dsphead);
ERRCHECK(result);
	// get DSP connection
FMOD::DSPConnection * con;
FMOD::DSP* aDspOutput = NULL;
result = dsphead->getOutput(0, &aDspOutput, &con);
ERRCHECK(result);

Hello Li Senlin,
The DSP you get is the very top of the DSP chain, so there is no output.

When you add a compressor at FMOD_CHANNELCONTROL_DSP_HEAD position, it becomes the head, and the fader, which used to be the head, is now moved down one postition.

There is no output or output connection at the very top of the tree.
You might want to move your compressor deeper into the tree if you want to pan or volume scale its output? (I assume this is why you want the connection?)

If you simply added the compressor at the tail, then you could then just use the master channelgroups setVolume or setMixMatrix type commands to control the final volume/pan, you dont even need to use a connection.

1 Like

Hi Brett,
I tried to use FMOD_CHANNELCONTROL_DSP_TAIL and it works fine.
Thanks for your help.