gpt4 book ai didi

android - OpenSL ES是否支持PerformanceMode::LowLatency?

转载 作者:行者123 更新时间:2023-12-02 23:03:02 29 4
gpt4 key购买 nike

当我在 Pixel 2(Oreo 8.0)上构建应用程序时,我得到PerformanceMode::LowLatency:

2019-06-30 15:04:15.560 8506-8506/? D/AUDIO-APP: HearSightEngine - Stream PlayStream IS low latency

2019-06-30 15:04:15.572 8506-8506/? D/AUDIO-APP: HearSightEngine - Stream Recording IS low latency


当我在 三星S7(牛轧糖7.0)应用程序上构建我的应用程序时,我听不到:

2019-06-30 14:49:30.874 20025-20025/? W/AUDIO-APP: HearSightEngine -Stream PlayStream is NOT low latency. Check your requested format,sample rate and channel count

2019-06-30 14:49:30.896 20025-20025/? W/AUDIO-APP: HearSightEngine -Stream Recording is NOT low latency. Check your requested format,sample rate and channel count


两个重大区别是

第一种情况使用
  • AAudio,第二种情况使用OpenSL ES。
  • 在第一种情况下使用
  • Pixel 2,在第二种情况下使用Samsung S7
    第二。

  • OpenSL ES是否支持PerformanceMode::LowLatency?还是三星S7不支持它?或者是其他东西?我阅读了常见问题解答[1],并提到了API的<26的AudioAttributes.FLAG_LOW_LATENCY,这样对我有帮助吗?
    [1] https://github.com/google/oboe/blob/master/docs/FAQ.md

    最佳答案

    仅从牛轧糖7.1起。在Android的早期版本中,性能模式将返回PerformanceMode::NoneHere's the code

    没有编程方式可以知道您在Android 7.0及更低版本上是否具有低延迟流。您可以使用adb shell dumpsys media.audio_flinger手动验证它,并在应用程序流旁边查找F(用于FAST跟踪)。

    通过遵循guidance here,可以最大限度地提高接收低延迟流的机会。

    关于android - OpenSL ES是否支持PerformanceMode::LowLatency?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56828501/

    29 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com