Conversation
|
@funtax @mitschwimmer It's working! Feel free to make changes if needed. To force it to use the native decoder change this line: librespot-android/app/build.gradle Line 25 in 168e9e3 |
|
@devgianlu great to hear that this worked out! Sadly it does not on my test device. The extractor is not finding a track in my case. Do you have an idea why? 2021-05-03 20:32:04.325 13829-13934/xyz.gianlu.librespot.android E/x.g.l.a.d.Decoders: Failed initializing Codec instance for VORBIS
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at xyz.gianlu.librespot.audio.decoders.Decoders.initDecoder(Decoders.java:54)
at xyz.gianlu.librespot.player.playback.PlayerQueueEntry.load(PlayerQueueEntry.java:140)
at xyz.gianlu.librespot.player.playback.PlayerQueueEntry.run(PlayerQueueEntry.java:271)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Caused by: xyz.gianlu.librespot.player.decoders.Decoder$CodecException: No tracks found.
at xyz.gianlu.librespot.player.decoders.AndroidNativeDecoder.<init>(AndroidNativeDecoder.java:51)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at xyz.gianlu.librespot.audio.decoders.Decoders.initDecoder(Decoders.java:54)
at xyz.gianlu.librespot.player.playback.PlayerQueueEntry.load(PlayerQueueEntry.java:140)
at xyz.gianlu.librespot.player.playback.PlayerQueueEntry.run(PlayerQueueEntry.java:271)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
2021-05-03 20:32:04.325 13829-13934/xyz.gianlu.librespot.android E/x.g.l.p.Player: Failed loading track.
java.io.UnsupportedEncodingException: VORBIS
at xyz.gianlu.librespot.player.playback.PlayerQueueEntry.load(PlayerQueueEntry.java:142)
at xyz.gianlu.librespot.player.playback.PlayerQueueEntry.run(PlayerQueueEntry.java:271)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
2021-05-03 20:32:04.325 13829-13866/xyz.gianlu.librespot.android D/AudioTrack: stop(73): called with 0 frames delivered |
|
@mitschwimmer What are you trying to play? |
|
Rick as given in the app module. |
|
Is there anything more in the logs coming directly from the extractor? Also, could you try playing something else? |
|
Played some different URI's but same result. I went through the debugger but only found that there is indeed no track found by the extractor. |
|
I see some But not entirely sure. Will have a closer look when possible. FYI, I tested on Android 6 (Samsung device). |
Yearh you got it down to Android 6? With the predefined track it's working on my Android 10-device. |
|
It seems to me the issue is somehow related to Android 11. @devgianlu, my suggestion would be to open an issue that this needs fixing. I do not think this should keep you from merging as Android 11 is kind of niche, still. |
|
I can try it on Android 11 as my main device runs that. On merging, I wanted to make an MP3 decoder too since it should be supported already. |
|
On Android 7, after patching the Base64-stuff, I get this Exception: With libtremolo it seems to work fine. |
|
Mhh, guess this is quite common. I'll make some changes so that if a decoder doesn't manage to initialize, it'll try the next one. |
This is a workaround to devgianlu/librespot-android#9 (comment)
|
@funtax @mitschwimmer Should work everywhere now. |
|
Hm, could you add logging? Right now it is hard to see which decoder is in use. Under which circumstances would it be the Android Native vorbis decoder? |
|
They are "evaluated" in this order:
I have also added the decoder name to the logs. |
Uh oh!
There was an error while loading. Please reload this page.