我正在尝试将一个直播直播加载到 audiomanager 中,但我有一个问题,它在野火 2.2 官方、野火 2.3 植根、带 2.2 的模拟器上运行良好,但不适用于 optimus black 2.2 官方和 x10 mini pro 2.1 官方。这是媒体播放器的错误还是什么?
代码很简单:
MediaPlayer mediaPlayer = new MediaPlayer();
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.setDataSource("http://150.214.174.129:8000/");
mediaPlayer.prepare();
mediaPlayer.start();
不工作时的logcat:
03-18 00:28:05.371: W/AudioSystem(3345): AudioFlinger server died!
03-18 00:28:05.371: W/IMediaDeathNotifier(3345): media server died
03-18 00:28:05.371: E/MediaPlayer(3345): error (100, 0)
03-18 00:28:05.379: W/System.err(3345): java.io.IOException: Prepare failed.: status=0x64
03-18 00:28:05.379: W/System.err(3345): at android.media.MediaPlayer.prepare(Native Method)
03-18 00:28:05.379: W/System.err(3345): at es.radio.onCreate(pruebaradio.java:77)
03-18 00:28:05.379: W/System.err(3345): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-18 00:28:05.379: W/System.err(3345): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
03-18 00:28:05.379: W/System.err(3345): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-18 00:28:05.379: W/System.err(3345): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-18 00:28:05.379: W/System.err(3345): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-18 00:28:05.379: W/System.err(3345): at android.os.Handler.dispatchMessage(Handler.java:99)
03-18 00:28:05.379: W/System.err(3345): at android.os.Looper.loop(Looper.java:123)
03-18 00:28:05.379: W/System.err(3345): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-18 00:28:05.379: W/System.err(3345): at java.lang.reflect.Method.invokeNative(Native Method)
03-18 00:28:05.379: W/System.err(3345): at java.lang.reflect.Method.invoke(Method.java:521)
03-18 00:28:05.379: W/System.err(3345): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
03-18 00:28:05.379: W/System.err(3345): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
03-18 00:28:05.379: W/System.err(3345): at dalvik.system.NativeStart.main(Native Method)
03-18 00:28:05.379: E/MediaPlayer(3345): start called in state 0
03-18 00:28:05.379: E/MediaPlayer(3345): error (-38, 0)
03-18 00:28:05.402: E/MediaPlayerJAVA(3345): Error (-38,0)
03-18 00:28:05.402: D/MediaPlayerJAVA(3345): Info (-38,0)