diff --git a/CHANGELOG.md b/CHANGELOG.md index 679a956ef..c8afeb2d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Renamed the `wasm-beep` and `audioworklet-beep` examples to `webaudio` and `audioworklet`. - **ALSA**: Update `alsa` dependency to 0.12. - **Linux**: `realtime` can now promote threads without requiring `realtime-dbus`. +- **PipeWire**: Set `node.rate` property. ### Deprecated diff --git a/src/host/pipewire/device.rs b/src/host/pipewire/device.rs index 833300e30..33152c595 100644 --- a/src/host/pipewire/device.rs +++ b/src/host/pipewire/device.rs @@ -174,7 +174,12 @@ impl Device { // Group input and output nodes so PipeWire schedules them in the same quantum, // preventing phase drift between simultaneous input/output streams. - properties.insert("node.group", format!("cpal-{}", std::process::id())); + properties.insert( + *pw::keys::NODE_GROUP, + format!("cpal-{}", std::process::id()), + ); + + properties.insert(*pw::keys::NODE_RATE, format!("1/{}", config.sample_rate)); if let BufferSize::Fixed(buffer_size) = config.buffer_size { properties.insert(