0 Replies
      Latest reply on Nov 25, 2019 2:09 PM by big mouses
      big mouses Level 1 Level 1 (0 points)

        I am programming an audio App using AudioUnit and AVAudioSession, and AVAudioSession is initialized as:

        [[AVAudioSession sharedInstance] setCategory:audioSessionCategory withOptions:AVAudioSessionCategoryOptionAllowBluetoothA2DP | AVAudioSessionCategoryOptionMixWithOthers error:NULL];


        When a Bluetooth headset is connected, I am able to get the output latency by "AVAudioSession.sharedInstance().outputLatency".

        However, the value retrieved is still much smaller than the real Bluetooth audio latency.

        Also, I found that such a latency is actually changing over time, sometimes, within 1 min, the latency can change from 193ms to 260ms.


        I am wondering how can I query the accurate current Bluetooth audio output latency using API calls?

        If not possible, is there any way to lock the output latency to a safe value using Bluetooth audio?

        I do not care about the latency if it is measurable.