# Audio fail problem on iPhone

**URL:** <https://forum.juce.com/t/audio-fail-problem-on-iphone/7728>\
**Category:** MacOSX and iOS\
**Created:** [November 18, 2011, 1:36am UTC](https://forum.juce.com/t/audio-fail-problem-on-iphone/7728 "2011-11-18T01:36:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hugh](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@hugh](https://forum.juce.com/u/hugh)\
**Post date:** [November 18, 2011, 1:36am UTC](https://forum.juce.com/t/audio-fail-problem-on-iphone/7728/1 "2011-11-18T01:36:46Z")

</div>

this is on the tip code. likely bug TBD.

i have a ipod 2nd gen and an iphone 3g. creating a device manager and then calling `playTestSound’ works on the ipod and not the iphone. it also fails on the iphone 4s.

after some investigation i found something. it’s related to opening without requesting input channels:

deviceManager.initialise(0, 2, 0, true, String::empty, 0);

if i change to this

deviceManager.initialise(2, 2, 0, true, String::empty, 0);

everything works.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [November 18, 2011, 9:23am UTC](https://forum.juce.com/t/audio-fail-problem-on-iphone/7728/2 "2011-11-18T09:23:50Z")

</div>

Did you get that the right way round? I’d have thought that on an old iPod without an audio input, you’d need to request a device with 0 input channels for it to work?

---

<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:** [November 18, 2011, 9:30am UTC](https://forum.juce.com/t/audio-fail-problem-on-iphone/7728/3 "2011-11-18T09:30:22Z")

</div>

I noticed this also for the ipad 2.

---

<div class="post-metadata">

**Author:** ![hugh](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@hugh](https://forum.juce.com/u/hugh)\
**Post date:** [November 18, 2011, 3:35pm UTC](https://forum.juce.com/t/audio-fail-problem-on-iphone/7728/4 "2011-11-18T15:35:53Z")

</div>

hi,

it appears it needs 2,2 to work on all devices. 2,2 works on the old ipod i have as well as 0,2, but 0,2 does _not_ work the other iOS devices i have tried.

i dont know what’s really going on here, whether these numbers represent a request for services or whether they represent a requirement. maybe 0,2 means “find a device with no input and 2 outputs”, but there isnt one. only one with 2 inputs and 2 outputs. dont know.

however, i can report that requesting 0,2 on iphone, where it doesnt work, the call to `initialise’ does not return any kind of warning or error string.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [November 18, 2011, 6:49pm UTC](https://forum.juce.com/t/audio-fail-problem-on-iphone/7728/5 "2011-11-18T18:49:44Z")

</div>

I made a change a week ago that may be relevant to this… (either as a possible fix or cause, depending on whether you’re using the latest version!)
