Number of input channels hardcoded to 1 in android OpenSL?

I changed this hardcoding in the OpenSLAudioIODevice to accommodate 2 channels:

    activeInputChans = inputChannels;
    //activeInputChans.setRange (1, activeInputChans.getHighestBit(), false);
    activeInputChans.setRange (2, activeInputChans.getHighestBit(), false); 

It seems to work great. I’m just wondering the reason behind this hardcoding… I assume there must be some “gotcha”.

I suspect that in some case (the Android device space is big!) the second channel was something really strange, so we defaulted to a single channel.

1 Like