1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

iOS: Fixed a bug in the audio channels of the simulator and older versions of iOS

This commit is contained in:
tpoole 2017-11-09 17:33:11 +00:00
parent 1b962aa2f2
commit a2bf8d49b6
2 changed files with 12 additions and 1 deletions

View file

@ -1195,6 +1195,10 @@ struct iOSAudioIODevice::Pimpl : public AudioPlayHead,
result.add (nsStringToJuce (desc.channelName));
}
// A fallback for the iOS simulator and older iOS versions
if (result.isEmpty())
return { "Left", "Right" };
return result;
}
@ -1202,8 +1206,9 @@ struct iOSAudioIODevice::Pimpl : public AudioPlayHead,
BigInteger requiredChannels)
{
requiredChannels.setRange (numHardwareChannelsAvailable,
requiredChannels.getHighestBit(),
requiredChannels.getHighestBit() + 1,
false);
return requiredChannels;
}

View file

@ -395,9 +395,15 @@ void AudioProcessor::setPlayConfigDetails (const int newNumIns,
if (getTotalNumInputChannels() != newNumIns)
success &= setChannelLayoutOfBus (true, 0, AudioChannelSet::canonicalChannelSet (newNumIns));
// failed to find a compatible input configuration
jassert (success);
if (getTotalNumOutputChannels() != newNumOuts)
success &= setChannelLayoutOfBus (false, 0, AudioChannelSet::canonicalChannelSet (newNumOuts));
// failed to find a compatible output configuration
jassert (success);
// if the user is using this method then they do not want any side-buses or aux outputs
success &= disableNonMainBuses();
jassert (success);