• Thomas Guillem's avatar
    audiotrack: handle HW latency · 985ff5cb
    Thomas Guillem authored
    Since Android 4.3 there is a hidden method that retrieve the audio hardware
    latency: AudioSystem.getOutputLatency() (that should not be used according to
    the android comments).
    
    This latency should not be used when we use AudioTrack.getTimestamp since it
    already take into account the hardware latency. So why adding a new method ?
    Because AudioTrack.getTimestamp don't work with Bluetooth (it returns false).
    
    This fix lip sync with Bluetooth audio.
    985ff5cb
audiotrack.c 47.6 KB