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/native
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
..
java/app/com/rmsl/juce Update licensing information 2024-04-16 11:39:35 +01:00
oboe Oboe: Update to 1.8.0 2023-11-29 13:56:10 +00:00
juce_ALSA_linux.cpp Versioning: Add the JUCE version number to any internally created threads 2024-09-26 08:10:56 +00:00
juce_ASIO_windows.cpp MinGW: Remove support 2024-06-27 18:10:21 +01:00
juce_Audio_android.cpp Versioning: Add the JUCE version number to any internally created threads 2024-09-26 08:10:56 +00:00
juce_Audio_ios.cpp iOS Audio: Always deactivate device before setting new preferred samplerate 2024-10-28 11:12:47 +00:00
juce_Audio_ios.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_Bela_linux.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_CoreAudio_mac.cpp Replace is_pod_v (deprecated by C++23) with is_standard_layout 2024-08-15 11:15:15 +02:00
juce_CoreMidi_mac.mm Platform: Remove references to unsupported platforms in docs and strings 2024-07-03 13:50:08 +01:00
juce_DirectSound_windows.cpp Versioning: Add the JUCE version number to any internally created threads 2024-09-26 08:10:56 +00:00
juce_HighPerformanceAudioHelpers_android.h Platform: Remove compatibility checks for Android 20 and earlier 2024-07-03 13:45:37 +01:00
juce_JackAudio_linux.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_Midi_android.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_Midi_linux.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_Midi_windows.cpp Windows: Fix DLL build 2024-10-22 13:24:46 +01:00
juce_Oboe_android.cpp Oboe: Remove an erroneous semicolon 2024-08-27 14:22:49 +01:00
juce_OpenSL_android.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_WASAPI_windows.cpp Versioning: Add the JUCE version number to any internally created threads 2024-09-26 08:10:56 +00:00