2

嗨,我想制作在线广播应用程序,因为我必须为此播放 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)
4

1 回答 1

1

您不能重命名ArrayDecoder类(即它必须属于com.spoledge.aacplayer包)。com.spoledge.aacplayer.ArrayDecoder您仍然可以从您的包中使用此类。我建议您不要将任何 aacplayer 类移动到您的包中。

于 2013-02-19T20:12:05.807 回答