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:
parent
60a19f5264
commit
99d8b9b5e1
1 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue