首先,道歉,我不是那种先进的Java。
我有一个应用程序,我正在关注哪些流实时音频(.mp3和/或.aac)工作正常。
我试图让它播放一个.mp3文件(不是直播,但是来自一个http://位置,该位置存在且可用于,例如,VLC)但是它崩溃了以下错误。
我希望AACPlayer也能够发挥静态'静音。 .mp3文件,但似乎不喜欢它。
很高兴提供任何可能相关的代码。我想在此之前,我只是想知道它是否完全可能,在我花费太多时间之前。
谢谢。
V/RadioManager: RadioManagerLog : IsPlaying : false
V/RadioManager: RadioPlayerService : Play requested.
W/LOG: Cannot set the ICY URLStreamHandler - maybe already set ? - java.lang.Error: factory already defined
D/libc: [NET] android_getaddrinfo_proxy get netid:0
D/libc: [NET] android_getaddrinfo_proxy-, success
V/RadioManager: RadioManagerLog : IsPlaying : false
D/AACPlayer: header: key=null, val=HTTP/1.1 200 OK
D/AACPlayer: header: key=Accept-Ranges, val=bytes
D/AACPlayer: header: key=Connection, val=Keep-Alive
D/AACPlayer: header: key=Content-Length, val=52654208
D/AACPlayer: header: key=Content-Type, val=audio/mpeg
D/AACPlayer: header: key=Date, val=Thu, 15 Feb 2018 12:31:54 GMT
D/AACPlayer: header: key=ETag, val="3237080-5651a72245219"
D/AACPlayer: header: key=Keep-Alive, val=timeout=5, max=100
D/AACPlayer: header: key=Last-Modified, val=Tue, 13 Feb 2018 16:25:42 GMT
D/AACPlayer: header: key=Server, val=Apache/2.4.7 (Ubuntu)
D/AACPlayer: header: key=X-Android-Received-Millis, val=1518697916374
D/AACPlayer: header: key=X-Android-Response-Source, val=NETWORK 200
D/AACPlayer: header: key=X-Android-Selected-Protocol, val=http/1.1
D/AACPlayer: header: key=X-Android-Sent-Millis, val=1518697916213
I/MultiPlayer: Setting MP3 decoder for content type audio/mpeg
I/AACPlayer: This stream does not provide dynamic metainfo
V/RadioManager: RadioPlayerService : Player started. tate : PLAYING
D/BufferReader: init(): capacity=3200
I/Decoder: start() starting native decoder - OpenCORE-MP3
D/BufferReader: next() waiting....
D/BufferReader: run() started....
D/BufferReader: next() awaken
D/Decoder: start() SYNC word found at offset=0
D/Decoder[OpenCORE-MP3]: start() Status[0]: 2 - consumed 0 bytes
E/Decoder[OpenCORE-MP3]: start() frame decode error=2
E/Decoder[OpenCORE-MP3]: start() first frame cannot be decoded - trying to sync again
E/Decoder[OpenCORE-MP3]: start() cannot re-sync the stream after next 1024 bytes, status=12
D/Decoder[OpenCORE-MP3]: start() Status[0]: 12 - consumed 0 bytes
E/Decoder[OpenCORE-MP3]: start() frame decode error=12
E/Decoder[OpenCORE-MP3]: start() first frame cannot be decoded - trying to sync again
E/Decoder[OpenCORE-MP3]: start() cannot re-sync the stream after next 1024 bytes, status=12
D/Decoder[OpenCORE-MP3]: start() Status[0]: 12 - consumed 0 bytes
E/Decoder[OpenCORE-MP3]: start() frame decode error=12
E/Decoder[OpenCORE-MP3]: start() first frame cannot be decoded - trying to sync again
E/Decoder[OpenCORE-MP3]: start() cannot re-sync the stream after next 576 bytes, status=12
D/Decoder[OpenCORE-MP3]: start() Status[0]: 12 - consumed 0 bytes
E/Decoder[OpenCORE-MP3]: start() frame decode error=12
E/Decoder[OpenCORE-MP3]: start() first frame cannot be decoded - trying to sync again
E/Decoder[OpenCORE-MP3]: start() cannot re-sync the stream after next 288 bytes, status=12
D/Decoder[OpenCORE-MP3]: start() Status[0]: 12 - consumed 0 bytes
E/Decoder[OpenCORE-MP3]: start() frame decode error=12
E/Decoder[OpenCORE-MP3]: start() first frame cannot be decoded - trying to sync again
E/Decoder[OpenCORE-MP3]: start() cannot re-sync the stream after next 144 bytes, status=12
D/Decoder[OpenCORE-MP3]: start() Status[0]: 12 - consumed 0 bytes
E/Decoder[OpenCORE-MP3]: start() frame decode error=12
E/Decoder[OpenCORE-MP3]: start() first frame cannot be decoded - trying to sync again
E/Decoder[OpenCORE-MP3]: start() cannot re-sync the stream after next 72 bytes, status=12
D/Decoder[OpenCORE-MP3]: start() Status[0]: 12 - consumed 0 bytes
E/Decoder[OpenCORE-MP3]: start() frame decode error=12
E/Decoder[OpenCORE-MP3]: start() first frame cannot be decoded - trying to sync again
E/Decoder[OpenCORE-MP3]: start() cannot re-sync the stream after next 36 bytes, status=12
E/Decoder[OpenCORE-MP3]: start() init failed status=12
E/Decoder: start() failed err=-1
I/Decoder: stop() stopping native decoder
D/BufferReader: run() stopped.
V/RadioManager: RadioPlayerService : Player stopped. State : STOPPED
E/AACPlayer: playAsync():
java.lang.RuntimeException: Cannot start native decoder
at com.spoledge.aacdecoder.Decoder.start(Decoder.java:238)
at com.spoledge.aacdecoder.AACPlayer.playImpl(AACPlayer.java:424)
at com.spoledge.aacdecoder.AACPlayer.play(AACPlayer.java:386)
at com.spoledge.aacdecoder.AACPlayer.play(AACPlayer.java:338)
at com.spoledge.aacdecoder.AACPlayer$1.run(AACPlayer.java:296)
at java.lang.Thread.run(Thread.java:761)
W/LOG: Cannot set the ICY URLStreamHandler - maybe already set ? - java.lang.Error: factory already defined
V/RadioManager: RadioPlayerService : ERROR OCCURED.