mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
iOS: Restore sample rate after iterating available sample rates
This commit is contained in:
parent
76e498f495
commit
f985cf0c31
1 changed files with 2 additions and 7 deletions
|
|
@ -610,6 +610,8 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater
|
||||||
|
|
||||||
sampleRates.addIfNotAlreadyThere (highestRate);
|
sampleRates.addIfNotAlreadyThere (highestRate);
|
||||||
|
|
||||||
|
sampleRate = trySampleRate (sampleRate);
|
||||||
|
|
||||||
AudioUnitAddPropertyListener (audioUnit,
|
AudioUnitAddPropertyListener (audioUnit,
|
||||||
kAudioUnitProperty_StreamFormat,
|
kAudioUnitProperty_StreamFormat,
|
||||||
dispatchAudioUnitPropertyChange,
|
dispatchAudioUnitPropertyChange,
|
||||||
|
|
@ -644,13 +646,6 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater
|
||||||
JUCE_IOS_AUDIO_LOG ("Updating hardware info");
|
JUCE_IOS_AUDIO_LOG ("Updating hardware info");
|
||||||
|
|
||||||
updateAvailableSampleRates();
|
updateAvailableSampleRates();
|
||||||
|
|
||||||
// The sample rate and buffer size may have been affected by
|
|
||||||
// updateAvailableSampleRates(), so try restoring the last good
|
|
||||||
// sample rate
|
|
||||||
sampleRate = trySampleRate (sampleRate);
|
|
||||||
bufferSize = getBufferSize (sampleRate);
|
|
||||||
|
|
||||||
updateAvailableBufferSizes();
|
updateAvailableBufferSizes();
|
||||||
|
|
||||||
if (deviceType != nullptr)
|
if (deviceType != nullptr)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue