1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

iOS: Fix sample rate detection on iOS 26

This commit is contained in:
reuk 2025-09-16 22:46:56 +01:00
parent 60a19f5264
commit 99d8b9b5e1
No known key found for this signature in database

View file

@ -542,7 +542,14 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater
// On iOS 18 the AVAudioSession sample rate is not always accurate but
// probing the sample rate via an AudioQueue seems to work reliably
if (@available (ios 18, *))
{
// On iOS 26, things seem to work as expected again,
// so avoid creating an AudioQueue
if (@available (ios 26, *))
return session.sampleRate;
return getSampleRateFromAudioQueue().value_or (session.sampleRate);
}
return session.sampleRate;
}