librespot-org / librespot

Open Source Spotify client library
MIT License
4.78k stars 594 forks source link

Add cpal Sink to librespot #145

Closed sashahilton00 closed 5 years ago

sashahilton00 commented 6 years ago

Currently, discussion to get Windows support is under way. Hopefully rust-mdns will be updated to work with Windows soon (#140), at which point, to ease running on Windows (and other systems), it would be good to implement a https://github.com/tomaka/cpal Sink for playback, which will remove the dependency on portaudio/pulseaudio, somewhat reducing the inconvenience of (cross) compiling for Windows.

awiouy commented 6 years ago

I have come across these today:

What do you think?

sashahilton00 commented 6 years ago

It looks to do a similar job to cpal, except that it's implemented by another library which has rust bindings, whilst cpal is pure rust. Is there a benefit to using libsound over cpal?

mfeif commented 6 years ago

One benefit is keeping Pulseaudio, which is the de-facto sound stack on all modern linux (I think).

burnoutberni commented 6 years ago

Is any work being done in this direction? A friend of mine just got one of these new Nokia "banana phones" and it runs KaiOS (formerly B2G/FirefoxOS), with all apps being "web apps". We're playing around with a couple of things now and an interesting side project might be to go ahead and try compiling librespot to WebAssembly. Not really sure where to start (Rust newbie here), but one of the main things would be to have WebAudio backend, which cpal seems to support.

willstott101 commented 5 years ago

Since #277 got merged I guess this can be closed now?

Taking this opportunity to mention that the README is now out of date.

sashahilton00 commented 5 years ago

Yup. Updated the readme. Closing.