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:
parent
1b962aa2f2
commit
a2bf8d49b6
2 changed files with 12 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue