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

iOS Audio: Reset sample rate to default after querying available rates

This commit is contained in:
reuk 2024-10-21 19:24:01 +01:00
parent aca71ca788
commit 6f20de5434
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -520,6 +520,10 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater
availableSampleRates.addIfNotAlreadyThere (highestRate); availableSampleRates.addIfNotAlreadyThere (highestRate);
// Reset sample rate back to the original, so that we don't end up stuck on the highest rate
sampleRate = trySampleRate (sampleRate);
bufferSize = getBufferSize (sampleRate);
AudioUnitAddPropertyListener (audioUnit, AudioUnitAddPropertyListener (audioUnit,
kAudioUnitProperty_StreamFormat, kAudioUnitProperty_StreamFormat,
dispatchAudioUnitPropertyChange, dispatchAudioUnitPropertyChange,