i have customers seeing the same issues on ios with an iTrack Dock. when connected to the dock my app startup takes ~30s and triggers an ios watchdog crash. if i start the app without the dock connected and then connect the app then everything slows down and all the audio settings take ~10s to update.
so i set JUCE_IOS_AUDIO_LOGGING
and get this output when connected to the dock:
Creating iOS audio device
Updating hardware info
Lowest supported sample rate: 44100
Highest supported sample rate: 96000
Trying a sample rate of 45100, got 48000
Trying a sample rate of 49000, got 88200
Trying a sample rate of 89200, got 96000
Available sample rates: 44100 48000 88200 96000
Sample rate after detecting available sample rates: 44100
Available buffer sizes: 64 128 256 512 1024 2048 4096
Buffer size after detecting available buffer sizes: 256
Input channel configuration: {Number of hardware channels: 2, Hardware channel names: "iTrack Dock 1" "iTrack Dock 2", Are channels available: yes, Active channel indices:, Inactive channel indices: 0 1}
Output channel configuration: {Number of hardware channels: 2, Hardware channel names: "iTrack Dock 1" "iTrack Dock 2", Are channels available: yes, Active channel indices:, Inactive channel indices: 0 1}
Opening audio device: inputChannelsWanted: 0, outputChannelsWanted: 11, targetSampleRate: 44100, targetBufferSize: 512
Input channel configuration: {Number of hardware channels: 2, Hardware channel names: "Left" "Right", Are channels available: yes, Active channel indices:, Inactive channel indices: 0 1}
Output channel configuration: {Number of hardware channels: 2, Hardware channel names: "iTrack Dock 1" "iTrack Dock 2", Are channels available: yes, Active channel indices: 0 1, Inactive channel indices:}
Updating hardware info
Lowest supported sample rate: 44100
Highest supported sample rate: 96000
Trying a sample rate of 45100, got 48000
Trying a sample rate of 49000, got 88200
Trying a sample rate of 89200, got 96000
Available sample rates: 44100 48000 88200 96000
Sample rate after detecting available sample rates: 44100
Available buffer sizes: 64 128 256 512 1024 2048 4096
Buffer size after detecting available buffer sizes: 256
Setting target sample rate: 44100
Actual sample rate: 44100
Setting target buffer size: 512
Actual buffer size: 512
Creating the audio unit
Internal buffer size: 4096
this takes 10-20s in debug mode.
when i disconnect the dock and start the app i get this output:
Creating iOS audio device
Updating hardware info
Lowest supported sample rate: 44100
Highest supported sample rate: 48000
Trying a sample rate of 45100, got 48000
Available sample rates: 44100 48000
Sample rate after detecting available sample rates: 44100
Available buffer sizes: 64 128 256 512 1024 2048 4096
Buffer size after detecting available buffer sizes: 256
Input channel configuration: {Number of hardware channels: 1, Hardware channel names: "iPad Microphone", Are channels available: yes, Active channel indices:, Inactive channel indices: 0}
Output channel configuration: {Number of hardware channels: 2, Hardware channel names: "Speaker 1" "Speaker 2", Are channels available: yes, Active channel indices:, Inactive channel indices: 0 1}
Opening audio device: inputChannelsWanted: 0, outputChannelsWanted: 11, targetSampleRate: 44100, targetBufferSize: 512
Input channel configuration: {Number of hardware channels: 2, Hardware channel names: "Left" "Right", Are channels available: yes, Active channel indices:, Inactive channel indices: 0 1}
Output channel configuration: {Number of hardware channels: 2, Hardware channel names: "Speaker 1" "Speaker 2", Are channels available: yes, Active channel indices: 0 1, Inactive channel indices:}
Updating hardware info
Lowest supported sample rate: 22050
Highest supported sample rate: 48000
Trying a sample rate of 23050, got 24000
Trying a sample rate of 25000, got 32000
Trying a sample rate of 33000, got 44100
Trying a sample rate of 45100, got 48000
Available sample rates: 22050 24000 32000 44100 48000
Sample rate after detecting available sample rates: 44100
Available buffer sizes: 64 128 256 512 1024 2048 4096
Buffer size after detecting available buffer sizes: 256
Setting target sample rate: 44100
Actual sample rate: 44100
Setting target buffer size: 512
Actual buffer size: 512
Creating the audio unit
Internal buffer size: 4096
and this happens almost instantly.
any juce folks have ideas here?