2014-01-09 23 views
0

使用杜比音頻API時出現以下錯誤。我故意使用循環來快速播放* .mp3文件,並且出現以下錯誤。使用杜比音頻API時的錯誤

01-03 20:42:04.109:E/AndroidRuntime(2913):致命異常:DsClientHandlerThread 01-03 20:42:04.109:E/AndroidRuntime(2913):了java.lang.RuntimeException:java.lang中.RuntimeException:內部DSClient.setDsOn(true)失敗! 01-03 20:42:04.109:E/AndroidRuntime(2913):在com.dolby.dap.DsClientManager.setDolbySurroundEnabled(DsClientManager.java:525)

如果通過的Soundpool或媒體播放器類加載* .MP3錯誤將被看到。

有趣的是* .ogg或* .wav很好。看起來與*。mp3文件格式分離

+0

您可以包含一些您正在使用的代碼嗎? –

+0

我加載了一個mp3文件,並且我故意循環播放它,所以我單獨播放它,例如對於(int x = 1; x <29; x ++) 0,0,1,0,1);} 這樣做是因爲一些Android設備在加載聲音之後,可能會根據最終用戶是否嘗試播放不同的聲音而導致延遲。 – angjc3

+0

* .wav也不好。只有* .ogg不會受到杜比的影響。請查閱杜比發行說明:http://developer.dolby.com/tools-tech.aspx(v1.1.1.0)。目前,我們已將所有的mp3文件轉換爲ogg文件,以便在Kindle Fire設備上跳過杜比處理。 – morph85

回答

0

目前在杜比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. 

的問題可能在未來的版本中解決。