Conversation
librespot-android-sink/src/main/java/xyz/gianlu/librespot/android/sink/AndroidSinkOutput.java
Show resolved
Hide resolved
librespot-android-sink/src/main/java/xyz/gianlu/librespot/android/sink/AndroidSinkOutput.java
Show resolved
Hide resolved
librespot-android-sink/src/main/java/xyz/gianlu/librespot/android/sink/AndroidSinkOutput.java
Show resolved
Hide resolved
|
track.stop() in AdnroidSinkOutput does not immediately stop but will play the remaining buffer first. If we want it to stop right away we need to implement .stop() by calling .pause() and .flush() in the method. What would you expect .stop() to do? |
These methods have the same functionality as the ones in
|
I think having an example activity that one can just run on its device would be a nice proof of concept, possibly adding some UI to play/pause (I can do that). Having tests would be an additional bonus since it is easy to break this if non-Android classes are used in the librespot-java source code. |
|
@mitschwimmer What's your opinion on #1? I think it could be really useful, I am in the process of merging it I have made it the default one on master (hence the merge conflicts). |
I am full of respect for someone using the NDK :-) |
Something like https://developer.android.com/reference/android/media/MediaCodec ? |
|
Yes, that should decode Ogg Vorbis (among others) and it offers buffers to work with. |
|
We can definitely have another module for that one too. Giving multiple options won't hurt. We can eventually make some benchmarks (?). Let me know if you want to take care of it or I'll do it. |
|
Please go ahead 😁 |
|
Absolutely, I love organization. |
|
Hey there, I am looking forward to your ideas & implementations. I darkly remember that I had implemented (or at least tried to) Vorbis-decoding via Android's native MediaCodec years ago (~2016). But either it didn't work, the minimum compile level didn't match at this time or something else. Would be interesting if this could be used now down to this project's current minimum API-level. |
Hey @devgianlu, I finally found some time to make this work. I have a couple of questions and would like your review which is why I am not just merging this.
I will place my Implementation questions/remarks as comments on the PR.
Regarding testing, I want to transform the MainActivity of the app-module into a couple of emulator/device Integration Tests which will be expecting credentials as environment variables. Would you like to keep the app-module as an implementation example?