1

我们的引擎创建媒体播放器:

final MediaPlayer mediaPlayer = new MediaPlayer();
final AssetFileDescriptor assetFileDescritor = pContext.getAssets().openFd(MusicFactory.sAssetBasePath + pAssetPath);
    mediaPlayer.setDataSource(assetFileDescritor.getFileDescriptor(), assetFileDescritor.getStartOffset(), assetFileDescritor.getLength());
mediaPlayer.prepare();

它在除 Pantech Crossover (Android 2.2.1) 之外的所有手机上都运行良好,它会导致游戏崩溃:

Caused by: java.io.IOException: setDataSourceFD failed.: status=0x80000000
  at android.media.MediaPlayer.setDataSource(Native Method)
  at org.anddev.andengine.audio.music.MusicFactory.createMusicFromAsset

任何想法如何解决这个问题或这里发生了什么?

4

0 回答 0