使用杜比音频 API 时出错



使用杜比音频 API 时出现以下错误。我故意使用循环来快速播放 *.mp3 文件,但出现以下错误。

01-03 20:42:04.109:E/AndroidRuntime(2913):致命异常:DsClientHandlerThread01-03 20:42:04.109: E/AndroidRuntime(2913): java.lang.RuntimeException: java.lang.RuntimeException: Internal DSClient.setDsOn(true) Failed!01-03 20:42:04.109: E/AndroidRuntime(2913): at com.dolby.dap.DsClientManager.setDolbySurroundEnabled(DsClientManager.java:525)

如果我通过声音池或媒体播放器类加载 *.mp3,则会看到错误。

有趣的是,*.ogg或*.wav就可以了。看起来与 *.mp3 文件格式隔离

目前在杜比 API v1.1.1.0 中,这是一个已知问题。请查看 API 并阅读发行说明:

6. Revision History
    Version 1.1.1.0
    Known issues:
    • On Kindle Fire HD/HDX devices, in an application leveraging the Dolby Audio 
      Plug-in, multiple calls to the Android™ MediaPlayer start/pause/stop APIs in 
      quick succession may result in the Dolby Audio Plug-in state getting out of 
      sync with the system-wide Dolby audio processing state. Subsequent calls to 
      the Dolby Audio Plug-in will rectify this state sync issue.
    • Using the MediaPlayer interface for audio playback may exhibit this issue, 
      with the exception of Ogg Vorbis streams. For gaming audio use cases, 
      playback using SoundPool or writing raw (PCM) audio directly to an AudioTrack 
      does not exhibit this issue. You can work around this issue by checking the 
      current Dolby audio processing state using isEnabled() to ensure the Dolby 
      Audio Plug-in has the desired state after the audio playback has started.

此问题可能会在将来的版本中得到纠正。

相关内容

  • 没有找到相关文章

最新更新