Skip to content

Commit

Permalink
Default to PortAudio backend on non-Linux
Browse files Browse the repository at this point in the history
- macOS homebrew[0], NetBSD pkgsrc[1], FreeBSD[2] and OpenBSD[3] ports
  diable default features and do not reenable "alsa_backend" by default
- macOS CI builds do not use it
- Windows has no ALSA

They all do, however, enable "portaudio_backend" to use PortAudio by default.

Reflect that such that the aforementioned four platforms/operating systems
do not have to override features whilst making ALSA Linux-only by default.

I am not sure what backend is used on Windows by default, but PortAudio
aught to work there;  certainly better than ALSA.

0: https://github.com/Homebrew/homebrew-core/blob/master/Formula/s/spotifyd.rb
1: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/audio/spotifyd/Makefile?rev=1.2&content-type=text/x-cvsweb-markup
2: https://cgit.freebsd.org/ports/tree/audio/spotifyd/Makefile
3: http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/audio/spotifyd/Makefile?rev=1.6&content-type=text/x-cvsweb-markup
  • Loading branch information
klemensn committed Jan 5, 2024
1 parent 7e37e88 commit 30e6753
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ env_logger = "0.10"
alsa_backend = ["librespot-playback/alsa-backend", "alsa"]
dbus_keyring = ["keyring"]
dbus_mpris = ["dbus", "dbus-tokio", "dbus-crossroads", "rspotify"]
default = ["alsa_backend"]
default = ["portaudio_backend"]
portaudio_backend = ["librespot-playback/portaudio-backend"]
pulseaudio_backend = ["librespot-playback/pulseaudio-backend"]
rodio_backend = ["librespot-playback/rodio-backend"]

[target."cfg(target_os = \"linux\)".features]
default = ["alsa_backend"]

[package.metadata.deb]
depends = "$auto, systemd, pulseaudio"
features = ["pulseaudio_backend", "dbus_keyring", "dbus_mpris"]
Expand Down

0 comments on commit 30e6753

Please sign in to comment.