# iOS 6 multi channel audio support in JUCE

**URL:** <https://forum.juce.com/t/ios-6-multi-channel-audio-support-in-juce/10000>\
**Category:** MacOSX and iOS\
**Created:** [February 19, 2013, 4:13pm UTC](https://forum.juce.com/t/ios-6-multi-channel-audio-support-in-juce/10000 "2013-02-19T16:13:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![billythekid](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/billythekid/32/88_2.png) [@billythekid](https://forum.juce.com/u/billythekid)\
**Post date:** [February 19, 2013, 4:13pm UTC](https://forum.juce.com/t/ios-6-multi-channel-audio-support-in-juce/10000/1 "2013-02-19T16:13:20Z")

</div>

Hi all. What is the current state of multi channel audio routing support in JUCE? Also, has anyone had any luck getting more the 2 channels of audio input via USB?

---

<div class="post-metadata">

**Author:** ![masshacker](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/masshacker/32/650_2.png) [@masshacker](https://forum.juce.com/u/masshacker)\
**Post date:** [February 19, 2013, 4:29pm UTC](https://forum.juce.com/t/ios-6-multi-channel-audio-support-in-juce/10000/2 "2013-02-19T16:29:08Z")

</div>

Hi,  
afaik JUCE currently supports 2 inputs + 2 outputs only. In fact, you can clearly see that by taking a look at juce\_ios\_Audio.cpp.  
However, I was able to implement multichannel support with a couple of days work.  
I can’t give you the sources, but you can take the wrapper for CoreAudio as a good starting point.

---

<div class="post-metadata">

**Author:** ![billythekid](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/billythekid/32/88_2.png) [@billythekid](https://forum.juce.com/u/billythekid)\
**Post date:** [February 19, 2013, 10:17pm UTC](https://forum.juce.com/t/ios-6-multi-channel-audio-support-in-juce/10000/3 "2013-02-19T22:17:54Z")

</div>

Thanks for the response. Are you saying that you’ve achieved \>2 channel input using a USB device?

---

<div class="post-metadata">

**Author:** ![masshacker](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/masshacker/32/650_2.png) [@masshacker](https://forum.juce.com/u/masshacker)\
**Post date:** [February 20, 2013, 8:40am UTC](https://forum.juce.com/t/ios-6-multi-channel-audio-support-in-juce/10000/4 "2013-02-20T08:40:43Z")

</div>

Yes I did. The hard part is to debug the code, since the 30 pins/lightning connector must be used to connect the usb hardware.  
Also, apple’s code is a mess when you try to handle every possible scenario regarding AudioSession (e.g. what happens if somebody calls your phone while your app is running? And so on…)  
I tested it using a lexicon omega connected via the camera connection kit, so far it’s working fine.  
You should start by creating your own custom AudioIODevice, you can then tell the AudioDeviceManager to use that instead of the standard iOSAudioIODevice.

---

<div class="post-metadata">

**Author:** ![billythekid](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/billythekid/32/88_2.png) [@billythekid](https://forum.juce.com/u/billythekid)\
**Post date:** [February 20, 2013, 11:59am UTC](https://forum.juce.com/t/ios-6-multi-channel-audio-support-in-juce/10000/5 "2013-02-20T11:59:22Z")

</div>

> [@](#):
>
> I tested it using a lexicon omega connected via the camera connection kit, so far it’s working fine.

You did this on an iPhone / iPod touch? When I connect the camera connection kit under iOS 6 using one of these devices it tells me that the device is not supported. Are you saying that it works on an iPhone with the Omega connected?

> [@](#):
>
> e.g. what happens if somebody calls your phone while your app is running? And so on…

In this project, I’m making a device that will only ever be used internally as an R&D tool for early stage hardware development. (Joyfully) I don’t have to worry about all the use cases.

> [@](#):
>
> You should start by creating your own custom AudioIODevice, you can then tell the AudioDeviceManager to use that instead of the standard iOSAudioIODevice.

Sounds logical. Thanks. I’ll acquire an OMEGA (they look like a nice low-cost toy for the purpose) to get testing ASAP if you confirm you can do this on an iPhone / iPod touch and not just iPad. If this works, then I’ll build something more compact around a USB to I2S interface…

---

<div class="post-metadata">

**Author:** ![masshacker](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/masshacker/32/650_2.png) [@masshacker](https://forum.juce.com/u/masshacker)\
**Post date:** [February 20, 2013, 12:08pm UTC](https://forum.juce.com/t/ios-6-multi-channel-audio-support-in-juce/10000/6 "2013-02-20T12:08:57Z")

</div>

> [@](#):
>
> You did this on an iPhone / iPod touch?

Uh, no sorry, my bad. I meant on the iPad. Sadly the camera connection kit seems to work on iPads only.

---

<div class="post-metadata">

**Author:** ![billythekid](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/billythekid/32/88_2.png) [@billythekid](https://forum.juce.com/u/billythekid)\
**Post date:** [February 20, 2013, 1:58pm UTC](https://forum.juce.com/t/ios-6-multi-channel-audio-support-in-juce/10000/7 "2013-02-20T13:58:42Z")

</div>

> [@](#):
>
> Sadly the camera connection kit seems to work on iPads only

It is an infuriating, and seemingly unnecessary limitation for us audio folk. Thanks for confirming that it at least works with iPads. It gives me another option to consider. There is always the jailbreak option, but it is something I really don’t want to have to ask even a small user group to do.
