Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UI to example activity #4

Closed
3 tasks done
devgianlu opened this issue Apr 25, 2021 · 8 comments
Closed
3 tasks done

Add UI to example activity #4

devgianlu opened this issue Apr 25, 2021 · 8 comments
Labels
enhancement New feature or request

Comments

@devgianlu
Copy link
Owner

devgianlu commented Apr 25, 2021

  • Login UI
  • Play from Uri
  • Play/pause/next/prev
@devgianlu devgianlu added the enhancement New feature or request label Apr 25, 2021
devgianlu added a commit that referenced this issue Apr 29, 2021
devgianlu added a commit that referenced this issue Apr 29, 2021
devgianlu added a commit that referenced this issue Apr 29, 2021
@mitschwimmer
Copy link
Collaborator

mitschwimmer commented May 1, 2021

Hey @devgianlu, amazing to see what you are achieving here!
Still, there seems to be an issue left with tremolo on the master branch. Once I see the player UI I can't actually play a track. I get this error:

2021-05-01 07:28:25.826 9374-9420/xyz.gianlu.librespot.android E/brespot.androi: No implementation found for long xyz.gianlu.librespot.player.decoders.tremolo.OggDecodingInputStream.initDecoder(java.nio.ByteBuffer) (tried Java_xyz_gianlu_librespot_player_decoders_tremolo_OggDecodingInputStream_initDecoder and Java_xyz_gianlu_librespot_player_decoders_tremolo_OggDecodingInputStream_initDecoder__Ljava_nio_ByteBuffer_2)
2021-05-01 07:28:25.827 9374-9420/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: java.lang.UnsatisfiedLinkError: No implementation found for long xyz.gianlu.librespot.player.decoders.tremolo.OggDecodingInputStream.initDecoder(java.nio.ByteBuffer) (tried Java_xyz_gianlu_librespot_player_decoders_tremolo_OggDecodingInputStream_initDecoder and Java_xyz_gianlu_librespot_player_decoders_tremolo_OggDecodingInputStream_initDecoder__Ljava_nio_ByteBuffer_2)
        at xyz.gianlu.librespot.player.decoders.tremolo.OggDecodingInputStream.initDecoder(Native Method)
        at xyz.gianlu.librespot.player.decoders.tremolo.OggDecodingInputStream.<init>(OggDecodingInputStream.java:36)
        at xyz.gianlu.librespot.player.decoders.TremoloVorbisCodec.<init>(TremoloVorbisCodec.java:20)
        at java.lang.reflect.Constructor.newInstance0(Native Methodat java.lang.reflect.Constructor.newInstance(Constructor.java:343at xyz.gianlu.librespot.audio.decoders.Decoders.initDecoder(Decoders.java:54at xyz.gianlu.librespot.player.playback.PlayerQueueEntry.load(PlayerQueueEntry.java:140at xyz.gianlu.librespot.player.playback.PlayerQueueEntry.run(PlayerQueueEntry.java:271at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641at java.lang.Thread.run(Thread.java:9232021-05-01 07:28:25.827 9374-9420/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)

I am testing on a Pixel 3aXL with Android 11. What do you think, should I open a new issue for that?

@devgianlu
Copy link
Owner Author

devgianlu commented May 1, 2021

That's strange, it's complaining about a missing native method, but it's there.

Maybe @funtax knows more

@funtax
Copy link
Collaborator

funtax commented May 1, 2021

This happens because the package of the decoder has changed. The native code is still targeting the old package/class Java_xyz_gianlu_librespot_player_codecs_tremolo_OggDecodingInputStream.

I will try to fix this later and provide a new compiled version.

@devgianlu
Copy link
Owner Author

Oh right, I renamed it because the terminology codec was wrong (and it has been for way too long) and this was the right time to change it.

Thank you for looking into it

@funtax
Copy link
Collaborator

funtax commented May 1, 2021

@devgianlu Could you give me write-access to this repo? Then I don't have to open a PR for such minor changes.

@devgianlu
Copy link
Owner Author

@funtax Invited you

@funtax
Copy link
Collaborator

funtax commented May 1, 2021

Perfect, thank you @devgianlu .
@mitschwimmer I have updated the native library but not tested it yet. Feel free to update and give it another try.

@mitschwimmer
Copy link
Collaborator

@funtax, @devgianlu just tried it. Works great 🕺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants