# Assertion: 'inchannels \<= mMixMatrixCurrent.numin()'

**URL:** https://qa.fmod.com/t/assertion-inchannels-mmixmatrixcurrent-numin/14511
**Category:** FMOD Engine
**Created:** [April 1, 2019, 9:11am UTC](https://qa.fmod.com/t/assertion-inchannels-mmixmatrixcurrent-numin/14511 "2019-04-01T09:11:30Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![jossdisguise](https://avatars.discourse-cdn.com/v4/letter/j/b77776/32.png) [@jossdisguise](https://qa.fmod.com/u/jossdisguise)
#### Post date: [April 1, 2019, 9:11am UTC](https://qa.fmod.com/t/assertion-inchannels-mmixmatrixcurrent-numin/14511/1 "2019-04-01T09:11:30Z")

</div>

I receive this error in the debug callback

`assertion: 'inchannels <= mMixMatrixCurrent.numin()' failed`

File and line info  
`Trace : < assert c:\jk\workspace\Build __1.10__ API_Win\lowlevel_api\src\fmod_dsp_connectioni.cpp:575]`

What does it mean and how can it be resolved?

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [April 2, 2019, 10:49pm UTC](https://qa.fmod.com/t/assertion-inchannels-mmixmatrixcurrent-numin/14511/2 "2019-04-02T22:49:47Z")

</div>

You are seeing an internal consistency check fail, could you provide a way to reproduce it?  
Once we know the cause we will be better positioned to recommend workarounds or action a fix.

---

<div class="post-metadata">

### Author: ![kamyker](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@kamyker](https://qa.fmod.com/u/kamyker)
#### Post date: [April 19, 2024, 1:53pm UTC](https://qa.fmod.com/t/assertion-inchannels-mmixmatrixcurrent-numin/14511/3 "2024-04-19T13:53:44Z")

</div>

I get this in Unity too, is there a way to get more logs?

```auto
[FMOD] assert : assertion: 'inchannels <= mMixMatrixCurrent.numin()' failed

UnityEngine.Debug:LogError (object)
FMODUnity.RuntimeUtils:DebugLogError (string) (at Assets/Plugins/FMOD/src/RuntimeUtils.cs:580)
FMODUnity.RuntimeManager:DEBUG_CALLBACK (FMOD.DEBUG_FLAGS,intptr,int,intptr,intptr) (at Assets/Plugins/FMOD/src/RuntimeManager.cs:104)

```

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [April 23, 2024, 3:52am UTC](https://qa.fmod.com/t/assertion-inchannels-mmixmatrixcurrent-numin/14511/4 "2024-04-23T03:52:25Z")

</div>

The [FMOD initialization settings](https://www.fmod.com/docs/2.03/unity/settings.html#initialization) in Unity have an option for changing the logging level, you can get all the FMOD logging by setting it to `Log`.

---

<div class="post-metadata">

### Author: ![kamyker](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@kamyker](https://qa.fmod.com/u/kamyker)
#### Post date: [September 24, 2024, 12:02pm UTC](https://qa.fmod.com/t/assertion-inchannels-mmixmatrixcurrent-numin/14511/5 "2024-09-24T12:02:00Z")

</div>

Can’t see anything related, what about you?

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/e/ee8dbc2858a9fa5ed7d52b17bf56739c473b6e86.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/b/b902dfb4274ef66b6e9f112f6f230e33726803be.png)

Seems to happen after first song is opened from file.

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [October 1, 2024, 12:01am UTC](https://qa.fmod.com/t/assertion-inchannels-mmixmatrixcurrent-numin/14511/6 "2024-10-01T00:01:13Z")

</div>

Which version of FMOD for Unity are you using?

---

<div class="post-metadata">

### Author: ![kamyker](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@kamyker](https://qa.fmod.com/u/kamyker)
#### Post date: [October 14, 2024, 7:57pm UTC](https://qa.fmod.com/t/assertion-inchannels-mmixmatrixcurrent-numin/14511/7 "2024-10-14T19:57:54Z")

</div>

Tried (the newest as of right now) 2.02.24 and 2.02.21

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [October 23, 2024, 4:19am UTC](https://qa.fmod.com/t/assertion-inchannels-mmixmatrixcurrent-numin/14511/8 "2024-10-23T04:19:42Z")

</div>

You mentioned that it ‘seems to happen after first song is opened from file’:  
Is the song being played through a bank or ogg file?  
Are you using any dsp effects on the song?

---

<div class="post-metadata">

### Author: ![kamyker](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@kamyker](https://qa.fmod.com/u/kamyker)
#### Post date: [October 23, 2024, 2:01pm UTC](https://qa.fmod.com/t/assertion-inchannels-mmixmatrixcurrent-numin/14511/9 "2024-10-23T14:01:35Z")

</div>

From file, MODE.NONBLOCKING | MODE.CREATESTREAM .

I have a dsp reading data all the time for FFT and visualization. Anything wrong here?

```
public KSDspCapture(ChannelGroup channelGroup)
{
	// Assign the callback to a member variable to avoid garbage collection
	readCallback = CaptureDSPReadCallback;

	// Allocate a data buffer large enough for 8 channels, pin the memory to avoid garbage collection
	// 8 channel * data for 8192 length
	uint bufferLength;
	RuntimeManager.CoreSystem.getDSPBufferSize(out bufferLength, out var _).Throw();
	uint multi = (uint)math.ceil(8192f / bufferLength);
	bufferLength = bufferLength * multi * 8;
	buffer = new((int)bufferLength, Allocator.Persistent);

	// Get a handle to this object to pass into the callback
	// Define a basic DSP that receives a callback each mix to capture audio
	DSP_DESCRIPTION desc = new DSP_DESCRIPTION();
	desc.numinputbuffers = 1;
	desc.numoutputbuffers = 1;
	desc.read = readCallback;

	RuntimeManager.CoreSystem.createDSP(ref desc, out captureDSP).Throw();

	channelGroup.getDSP(CHANNELCONTROL_DSP_INDEX.HEAD, out var channelGroupDsp).Throw();
	captureDSP.addInput(channelGroupDsp, out channelToCaptureConnection, DSPCONNECTION_TYPE.SEND_SIDECHAIN).Throw();

	RuntimeManager.CoreSystem.getMasterChannelGroup(out var master).Throw();
	master.getDSP(CHANNELCONTROL_DSP_INDEX.TAIL, out var masterTail).Throw(); //move this to before fader
	masterTail.addInput(captureDSP, out var con, DSPCONNECTION_TYPE.SIDECHAIN);

	captureDSP.setActive(true).Throw();

	dspHandle = captureDSP.handle;
	DspsLookup.Add(dspHandle, this);

```

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [October 25, 2024, 4:59am UTC](https://qa.fmod.com/t/assertion-inchannels-mmixmatrixcurrent-numin/14511/10 "2024-10-25T04:59:24Z")

</div>

The only thing that stands out is it looks like you aren’t passing a handle through the usedata of the `FMOD.DSP_DESCRIPTION` like we do in the [DSP Capture example](https://www.fmod.com/docs/2.02/unity/examples-dsp-capture.html), although I assume your `DspsLookup` is taking care of that instead.

Are you able to trim down a project, that does the bare minimum to throw the error, which you are able to share with us? I have been unable to reproduce the issue here so far.
