嗨,我想制作在线广播应用程序,因为我必须为此播放 aac 文件,我已经从http://aacplayer-android.googlecode.com/files/aacplayer-android-r25.zip示例复制了 armeabi 文件夹,下面是截屏
下面的代码工作正常
static {
System.loadLibrary("aacarray");
System.loadLibrary("mms");
}
哪个加载库没有任何错误
但是当我开始使用此代码从服务器播放流时
player = new ArrayAACPlayer(ArrayDecoder.create(Decoder.DECODER_OPENCORE), this, Integer.parseInt(String.valueOf(AACPlayer.DEFAULT_AUDIO_BUFFER_CAPACITY_MS)), Integer.parseInt(String
.valueOf(AACPlayer.DEFAULT_DECODE_BUFFER_CAPACITY_MS)));
try {
System.out.println("One : "+RADIO_STATION_URL);
player.playAsync(RADIO_STATION_URL);
} catch (Exception e) {
e.printStackTrace();
}
我得到以下错误
02-19 15:15:08.124: E/AndroidRuntime(769): FATAL EXCEPTION: Thread-12
02-19 15:15:08.124: E/AndroidRuntime(769): java.lang.UnsatisfiedLinkError: nativeStart
02-19 15:15:08.124: E/AndroidRuntime(769): at com.example.xmlparsingex.ArrayDecoder.nativeStart(Native Method)
02-19 15:15:08.124: E/AndroidRuntime(769): at com.example.xmlparsingex.ArrayDecoder.start(ArrayDecoder.java:100)
02-19 15:15:08.124: E/AndroidRuntime(769): at com.example.xmlparsingex.ArrayAACPlayer.playImpl(ArrayAACPlayer.java:114)
02-19 15:15:08.124: E/AndroidRuntime(769): at com.example.xmlparsingex.AACPlayer.play(AACPlayer.java:273)
02-19 15:15:08.124: E/AndroidRuntime(769): at com.example.xmlparsingex.AACPlayer.play(AACPlayer.java:242)
02-19 15:15:08.124: E/AndroidRuntime(769): at com.example.xmlparsingex.AACPlayer$1.run(AACPlayer.java:202)
02-19 15:15:08.124: E/AndroidRuntime(769): at java.lang.Thread.run(Thread.java:1019)