# getChannel() always returns invalid handle

**URL:** https://qa.fmod.com/t/getchannel-always-returns-invalid-handle/11937
**Category:** Unity
**Created:** [May 28, 2015, 5:21pm UTC](https://qa.fmod.com/t/getchannel-always-returns-invalid-handle/11937 "2015-05-28T17:21:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![danbrani](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@danbrani](https://qa.fmod.com/u/danbrani)
#### Post date: [May 28, 2015, 5:21pm UTC](https://qa.fmod.com/t/getchannel-always-returns-invalid-handle/11937/1 "2015-05-28T17:21:19Z")

</div>

I’m using FMOD.System.getChannelsPlaying to see how many playing channels there are, and the value is correct, with channels increasing as I play new sfx.

When I use FMOD.System.getChannel() I get result OK, but when I try to set channel’s volume, pan or whatever else, it returns ERR\_INVALID\_HANDLE. That is so for every channel I get this way.

Please, anybody, help!

---

<div class="post-metadata">

### Author: ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)
#### Post date: [May 29, 2015, 12:20am UTC](https://qa.fmod.com/t/getchannel-always-returns-invalid-handle/11937/2 "2015-05-29T00:20:36Z")

</div>

Don’t assume that if you have N channels playing that getChannel(x) where 0 \<= x \< N will return a playing channel.

getChannel() indexes the channel pool that is initialized based on the parameter passed into System::init(). The channel that your sound plays could be any member of this pool.

Just use the channel handle that you get back from playSound().
