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

Windows Support #23

Closed
Herbstein opened this issue Mar 7, 2019 · 9 comments
Closed

Windows Support #23

Herbstein opened this issue Mar 7, 2019 · 9 comments
Labels
enhancement New feature or request

Comments

@Herbstein
Copy link
Contributor

Herbstein commented Mar 7, 2019

This is a tracking issue at this point.

I just tested after 41164df was commited, and #10 was closed.

Cursive linking and compilation seems to work well now.

The big issue is that right now librespot is configured to use pulseaudio as the backend. And, without fiddling with an MSYS2 installation, I don't think there's any way of making that work on Windows in a satisfactory way. However, it seems librespot want to move away from having their own internal playback implementation, and instead delegate it to the Rodio crate - discussed in librespot-org/librespot#195. This is being done in the librespot-org/librespot#277 pull request, though it seems progress has slowed a bit.

Looking at the main.rs file, I can also tell that you are making some assumptions about there being a $HOME environment variable, which you can't on Windows. Through a quick look around it seems app_dirs is a preferred way to find resource directories.

I didn't see anything else, but there might be some more lurking in there.

@hrkfdn
Copy link
Owner

hrkfdn commented Mar 7, 2019

Some solid points, thanks. I'll keep it open so once I have some time I might be able to tackle some of these or maybe someone else would like to have a look.

@hrkfdn hrkfdn added the enhancement New feature or request label Mar 7, 2019
@Herbstein
Copy link
Contributor Author

Just a small update. The Rodio backend for librespot almost kinda works. I'm experiencing some problems, but it seems the developer of the backend isn't. More testing is needed, but the prospects look great.

@ashthespy
Copy link

For the impatient - the portaudio backend works quite fine with Windows - have it running here on Win10 a few months now now issues.

@hrkfdn
Copy link
Owner

hrkfdn commented Mar 24, 2019

I have switched over to the Rodio backend, which is what librespot uses by default now. It should work on macOS and Windows out of the box. Reports are appreciated :)

@hrkfdn
Copy link
Owner

hrkfdn commented Sep 12, 2019

I have moved over to PulseAudio by default again, as Rodio blocks a whole CPU thread in idle.

Optional linking with PortAudio/Rodio backend is still supported. I'm closing this for now.

@hrkfdn hrkfdn closed this as completed Sep 12, 2019
@ghost
Copy link

ghost commented Mar 25, 2020

Sorry to comment on a closed issue but how are you guys getting it to work on windows? My install or local build just fails with libdbus-sys errors

@Herbstein
Copy link
Contributor Author

Herbstein commented Mar 25, 2020

I haven't been involved here for some time, but I got to the login screen just now with the following command:

cargo run --no-default-features --features rodio_backend,cursive/pancurses-backend

Make sure to use the MSVC-based rustc, and not the GNU-based one. Further, after logging in with Facebook I get a hang (looks like some infinite loop?), but after restarting it works perfectly and I get audio as expected.

image

@ghost
Copy link

ghost commented Mar 25, 2020

@Herbstein awesome that did the trick! although it is creating a base window and then another window which is ncspot, but I can live with that

@rashil2000
Copy link
Contributor

You can add this section to Cargo.toml to make it work without opening a separate window:

[dependencies.pancurses]
version = "0.16.1"
features = ["win32"]

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

4 participants