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

Fix default port selection parameters for PipeWire compatibility #556

Closed
Closed
Changes from all commits
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
10 changes: 6 additions & 4 deletions src/host/jack/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Mutex};
use traits::StreamTrait;

const FLOAT_MONO_AUDIO: &str = "32 bit float mono audio";

use crate::{
BackendSpecificError, Data, InputCallbackInfo, OutputCallbackInfo, PauseStreamError,
PlayStreamError, SampleRate, StreamError,
Expand Down Expand Up @@ -149,9 +151,9 @@ impl Stream {
pub fn connect_to_system_outputs(&mut self) {
// Get the system ports
let system_ports = self.async_client.as_client().ports(
Some("system:playback_.*"),
None,
jack::PortFlags::empty(),
Some(FLOAT_MONO_AUDIO),
jack::PortFlags::IS_INPUT | jack::PortFlags::IS_PHYSICAL,
Copy link
Contributor

Choose a reason for hiding this comment

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

IIUC this just guesses to use an arbitrary hardware device?

);

// Connect outputs from this client to the system playback inputs
Expand All @@ -175,9 +177,9 @@ impl Stream {
pub fn connect_to_system_inputs(&mut self) {
// Get the system ports
let system_ports = self.async_client.as_client().ports(
Some("system:capture_.*"),
None,
jack::PortFlags::empty(),
Some(FLOAT_MONO_AUDIO),
jack::PortFlags::IS_OUTPUT | jack::PortFlags::IS_PHYSICAL,
);

// Connect outputs from this client to the system playback inputs
Expand Down