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

**URL:** https://qa.fmod.com/t/can-not-get-a-dspconnection-from-the-compressor-dsp-in-master-channel-group/13406
**Category:** FMOD Studio
**Created:** [September 6, 2017, 8:59am UTC](https://qa.fmod.com/t/can-not-get-a-dspconnection-from-the-compressor-dsp-in-master-channel-group/13406 "2017-09-06T08:59:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lisenlin](https://avatars.discourse-cdn.com/v4/letter/l/a88e4f/32.png) [@lisenlin](https://qa.fmod.com/u/lisenlin)
#### Post date: [September 6, 2017, 8:59am UTC](https://qa.fmod.com/t/can-not-get-a-dspconnection-from-the-compressor-dsp-in-master-channel-group/13406/1 "2017-09-06T08:59:29Z")

</div>

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);
```

---

<div class="post-metadata">

### Author: ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)
#### Post date: [September 7, 2017, 1:40am UTC](https://qa.fmod.com/t/can-not-get-a-dspconnection-from-the-compressor-dsp-in-master-channel-group/13406/2 "2017-09-07T01:40:48Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![lisenlin](https://avatars.discourse-cdn.com/v4/letter/l/a88e4f/32.png) [@lisenlin](https://qa.fmod.com/u/lisenlin)
#### Post date: [September 7, 2017, 1:59am UTC](https://qa.fmod.com/t/can-not-get-a-dspconnection-from-the-compressor-dsp-in-master-channel-group/13406/3 "2017-09-07T01:59:39Z")

</div>

> [@](#):
>
> 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.

Hi Brett,  
I tried to use FMOD\_CHANNELCONTROL\_DSP\_TAIL and it works fine.  
Thanks for your help.
