iOS Audio: can't access input channel 3 or higher

There are lots of multichannel iOS audio devices out there.
Our uses often use a mono input from guitars or mics on channel 3 or 4.. but juce only has 2.

When I first wrote that class, all the devices were stereo.. Will have a look into it.

Any updates on this? I assumed multi-channel audio would be supported on iOS but it does not seem to be the case unless I’ve missed something…?

So I’ve started looking at the iOSAudioIODevice class to see how to modify it to support multichannel audio.
From what I’ve looked at briefly, I’d need to:

  • Allow the input and output buffers to hold an arbitrary number of channels of audio
  • Get the number of available channels using e.g. [session inputNumberOfChannels]
  • Call resetFormat with the number of channels needed (or available)

Any tips more experienced folk can lend on this? JUCE Team? (I know its the weekend now…!)

Bumping this as I will need this functionality for a client’s app within the next couple of weeks. It would be great if the JUCE team could add this. However, if there are other priorities I would appreciate some assistance in getting this implemented.

Hey JUCE team, any word on this issue?
Turns out its not super urgent as I thought but would be good to know where things stand in any case.

We’re aware of it, and it’s in our backlog, but we’ve got quite a lot of more urgent work to do first. I’m afraid I can’t give you a reasonable ETA.

Thanks @t0m, thats fine, as I suspected.
I will get onto it when the time comes and send a pull request when its working, if it hasn’t reached the top of your backlog by then…

Hi everyone,

I would also be highly interested in this.





I’m very interested in this, too.

I was optimistic that it is being implemented, since many changes were made in juce_ios_audio.cpp/.h in the last versions. Looks like all the work is done, but the transfer of channels data is still hard coded:

juce_ios_audio.cpp, line 722:

            if (numInputChannels >= 2)
                for (UInt32 i = 0; i < numFrames; ++i)
                    inputChannels[0][i] = *shortData++ * (1.0f / 32768.0f);
                    inputChannels[1][i] = *shortData++ * (1.0f / 32768.0f);

juce_ios_audio.cpp, line 754:

        if (numOutputChannels >= 2)
            for (UInt32 i = 0; i < numFrames; ++i)
                shortData [n++] = (short) (outputChannels[0][i] * 32767.0f);
                shortData [n++] = (short) (outputChannels[1][i] * 32767.0f);

It would be great have this implemented.



We’ve not forgotten about this, but again I can’t give an ETA.

1 Like