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

Separate out audio functionality #234

Closed
dsvensson opened this issue May 17, 2020 · 6 comments · Fixed by #245
Closed

Separate out audio functionality #234

dsvensson opened this issue May 17, 2020 · 6 comments · Fixed by #245
Labels
enhancement New feature or request

Comments

@dsvensson
Copy link

It would be great if audio functionality would be split out into a separate module to enable headless mode where the use is only data rather than playback.

@dsvensson dsvensson added the enhancement New feature or request label May 17, 2020
@devgianlu
Copy link
Member

What do you mean by data?

@dsvensson
Copy link
Author

I guess I interpreted this as a library rather than an application and it was a bit unexpected that for example the argument to FileConfiguration was the actual string "--conf-file=...", and that it opened an audio device, but perhaps librespot is more thought of as librespot, completely geared towards reproducing a Spotify Desktop Client like app?

I was just interested in writing a cli to search with. Seems like setting the [player] output = "STDOUT" got rid of the mixer probing. Haven't tried running it with a headless JVM yet, but perhaps that'll work now.

Still having some issues with shutdown, seems like some OkHttp thread lingers even after calling session.close().

@devgianlu
Copy link
Member

You're right, the name is a bit confusing because this is a fully fletched player with library features all merged together. While I like the idea of separating the API part of the project into a different module, I need to combat piracy (low effort piracy) by avoiding to expose crucial parts which can be exploited. That is feasible though.

Setting the output to STDOUT will get rid of the mixer problem and won't output anything as long as you don't ask it to.

Still having some issues with shutdown, seems like some OkHttp thread lingers even after calling session.close().

As I don't use the project as a library specifically I tend to leave those behind, please open a separate issue or PR and I'll sort it out.

@dsvensson
Copy link
Author

dsvensson commented May 17, 2020

@devgianlu Humm.... I wonder if it performs close() on stdout then when issuing session.close(), last line of that function, Closed session. {deviceId: %s} , never reaches the console :)

devgianlu added a commit that referenced this issue May 18, 2020
@devgianlu
Copy link
Member

It was indeed closing STDOUT so I fixed that, but the issue remains if the library is closed with Ctrl-C because the logger threads are shutdowned too.

@devgianlu devgianlu linked a pull request Jul 22, 2020 that will close this issue
6 tasks
@devgianlu
Copy link
Member

Closing in favor of #245.

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

Successfully merging a pull request may close this issue.

2 participants