1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
JUCE/modules/juce_audio_devices
reuk 3506d66fae
iOS Audio: Always deactivate device before setting new preferred samplerate
This fixes a bug on iOS 17 running on a 9th gen iPad.

- Set JUCE_IOS_AUDIO_EXPLICIT_SAMPLERATES=44100,48000,88200,96000
- Start the DemoRunner.
- Add a breakpoint in AudioDeviceManager::audioDeviceAboutToStartInt().
- In the DemoRunner, change the sample rate to 96000.
- The breakpoint will fire. Observe the value of
  getCurrentBufferSizeSamples().
- Move the breakpoint to audioDeviceIOCallbackInt and continue
  execution.
- The breakpoint will fire. Observe the value of the numSamples
  parameter.

numSamples should always be no larger than the sample count reported in
audioDeviceAboutToStartInt().

Before this change, it was possible for getCurrentBufferSizeSamples() to
return a value smaller than the buffer size of subsequent process
callbacks.

Removing the availability checks and unconditionally
deactivating/reactivating the device seems to fix this issue, and the
correct buffer size is returned immediately when the device is
(re)started.
2024-10-28 11:12:47 +00:00
..
audio_io Platform: Remove compatibility checks for Windows 8.1 and earlier 2024-07-03 13:47:06 +01:00
midi_io Versioning: Add the JUCE version number to any internally created threads 2024-09-26 08:10:56 +00:00
native iOS Audio: Always deactivate device before setting new preferred samplerate 2024-10-28 11:12:47 +00:00
sources Update licensing information 2024-04-16 11:39:35 +01:00
juce_audio_devices.cpp Fix C++23 compilation 2024-08-15 11:15:15 +02:00
juce_audio_devices.h Bump version number to 8.0.3 2024-10-15 22:16:12 +01:00
juce_audio_devices.mm Update licensing information 2024-04-16 11:39:35 +01:00