Detect AVAudioSession issues

Hi,

I'm working on a conversation/streaming app and I'm sometimes getting these logs when connected to a bluetooth device :

kAudioUnitErr_TooManyFramesToProcess : inFramesToProcess=2822, mMaxFramesPerSlice=1156

I understand the issue comes from the limitations of my bluetooth headset and that a solution would be to use a different Sample rate. The issue is that I didn't find a way to receive this information from the app other than in the logs.

How could I receive this error on my code ?

Thanks, Hugo

Detect AVAudioSession issues
 
 
Q