Errors when using Dolby Audio API

411 Views Asked by At

I get the following errors when using the Dolby Audio API. I'm purposely using a loop to play an *.mp3 file quickly and I'm getting the following error.

01-03 20:42:04.109: E/AndroidRuntime(2913): FATAL EXCEPTION: DsClientHandlerThread 01-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)

If I load the *.mp3 via soundpool or mediaplayer class the error will be seen.

What's interesting is that *.ogg or *.wav is fine. Looks isolated to *.mp3 file format

1

There are 1 best solutions below

0
morph85 On

Currently in Dolby API v1.1.1.0, this is a known issue. Please check out the API and read the release note:

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.

The issue might be rectified in future release.