1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

iOS: Set target settings before updating hardware info to reduce the number of device changes

This commit is contained in:
Anthony Nicholls 2025-02-26 14:08:28 +00:00
parent 462c1c857e
commit a433e4dce0

View file

@ -694,8 +694,8 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater
setAudioSessionCategory (requestedInputChannels > 0 ? AVAudioSessionCategoryPlayAndRecord setAudioSessionCategory (requestedInputChannels > 0 ? AVAudioSessionCategoryPlayAndRecord
: AVAudioSessionCategoryPlayback); : AVAudioSessionCategoryPlayback);
channelData.reconfigure (requestedInputChannels, requestedOutputChannels); channelData.reconfigure (requestedInputChannels, requestedOutputChannels);
updateHardwareInfo (true);
setTargetSampleRateAndBufferSize(); setTargetSampleRateAndBufferSize();
updateHardwareInfo (true);
fixAudioRouteIfSetToReceiver(); fixAudioRouteIfSetToReceiver();
isRunning = true; isRunning = true;
@ -1348,8 +1348,8 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater
} }
updateHardwareInfo();
setTargetSampleRateAndBufferSize(); setTargetSampleRateAndBufferSize();
updateHardwareInfo();
if (isRunning) if (isRunning)
{ {