Android: sound API (deterministic, low latency)

后端 未结 5 684
天涯浪人
天涯浪人 2020-12-04 13:07

I\'m reviewing all kinds of Android sound API and I\'d like to know which one I should use. My goal is to get low latency audio or, at least, deterministic behavior regardin

5条回答
  •  情话喂你
    2020-12-04 13:47

    The best way to get low latency for native code on Android is to use Oboe.

    https://github.com/google/oboe

    Oboe wraps AAudio on newer devices. AAudio offers the lowest possible latency paths. If AAudio is not available then Oboe calls OpenSL ES. Oboe is much easier to use than OpenSL ES.

    AAudio either calls through AudioTrack or through a new MMAP data path. AAudio makes it easier to get a FAST track because you can leave some parameters unspecified. AAudio will then choose the right parameters needed for a FAST track.

提交回复
热议问题