Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 182 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ alsa-backend = ["librespot-playback/alsa-backend"]
# Integrates with the PulseAudio sound server for advanced audio routing.
pulseaudio-backend = ["librespot-playback/pulseaudio-backend"]

# pipewire-backend: PipeWire backend (Linux only).
# Modern audio server that provides low-latency audio with advanced routing capabilities.
# Designed as a replacement for both PulseAudio and JACK.
pipewire-backend = ["librespot-playback/pipewire-backend", "dep:pipewire", "dep:libspa"]

# jackaudio-backend: JACK Audio Connection Kit backend.
# Professional audio backend for low-latency, high-quality audio routing.
jackaudio-backend = ["librespot-playback/jackaudio-backend"]
Expand Down Expand Up @@ -183,6 +188,10 @@ tokio = { version = "1", features = [
] }
url = "2.2"

# Dependencies for pipewire
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should go to playback/Cargo.toml.

libspa = { version = "0.9", optional = true }
pipewire = { version = "0.9", optional = true }

[package.metadata.deb]
maintainer = "Librespot Organization <[email protected]>"
copyright = "2015, Paul Liétar"
Expand Down
3 changes: 3 additions & 0 deletions playback/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ gstreamer-backend = [
"dep:gstreamer-audio",
]
jackaudio-backend = ["dep:jack"]
pipewire-backend = ["dep:pipewire", "dep:libspa"]
portaudio-backend = ["dep:portaudio-rs"]
pulseaudio-backend = ["dep:libpulse-binding", "dep:libpulse-simple-binding"]
rodio-backend = ["dep:cpal", "dep:rodio"]
Expand Down Expand Up @@ -62,6 +63,8 @@ zerocopy = { version = "0.8", features = ["derive"] }
# Backends
alsa = { version = "0.10", optional = true }
jack = { version = "0.13", optional = true }
libspa = { version = "0.9", optional = true }
pipewire = { version = "0.9", optional = true }
portaudio-rs = { version = "0.3", optional = true }
sdl2 = { version = "0.38", optional = true }

Expand Down
7 changes: 7 additions & 0 deletions playback/src/audio_backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ mod pulseaudio;
#[cfg(feature = "pulseaudio-backend")]
use self::pulseaudio::PulseAudioSink;

#[cfg(feature = "pipewire-backend")]
mod pipewire;
#[cfg(feature = "pipewire-backend")]
use self::pipewire::PipeWireSink;

#[cfg(feature = "jackaudio-backend")]
mod jackaudio;
#[cfg(feature = "jackaudio-backend")]
Expand Down Expand Up @@ -130,6 +135,8 @@ pub const BACKENDS: &[(&str, SinkBuilder)] = &[
(PortAudioSink::NAME, mk_sink::<PortAudioSink<'_>>),
#[cfg(feature = "pulseaudio-backend")]
(PulseAudioSink::NAME, mk_sink::<PulseAudioSink>),
#[cfg(feature = "pipewire-backend")]
(PipeWireSink::NAME, mk_sink::<PipeWireSink>),
#[cfg(feature = "jackaudio-backend")]
(JackSink::NAME, mk_sink::<JackSink>),
#[cfg(feature = "gstreamer-backend")]
Expand Down
Loading
Loading