Skip to content

Commit 305b8d1

Browse files
committed
fix(alsa,pipewire): fix compile errors
1 parent 0987f03 commit 305b8d1

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/backends/alsa/device.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ impl AlsaDevice {
100100
let direction = match device_type {
101101
DeviceType::Input => alsa::Direction::Capture,
102102
DeviceType::Output => alsa::Direction::Playback,
103-
_ => return Ok(None),
104103
};
105104
let pcm = Rc::new(PCM::new("default", direction, true)?);
106105
Ok(Some(Self {

src/backends/pipewire/utils.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn get_device_type(object: &GlobalObject<&DictRef>) -> Option<DeviceType> {
1919

2020
let media_class = object.props?.get("media.class")?;
2121
Some(match (is_input(media_class), is_output(media_class)) {
22-
(true, true) => DeviceType::Duplex,
22+
(true, true) => DeviceType::Output,
2323
(true, _) => DeviceType::Input,
2424
(_, true) => DeviceType::Output,
2525
_ => return None,
@@ -85,6 +85,5 @@ pub fn get_default_node_for(device_type: DeviceType) -> u32 {
8585
match device_type {
8686
DeviceType::Input => 0,
8787
DeviceType::Output => 1,
88-
DeviceType::Duplex => 2,
8988
}
9089
}

0 commit comments

Comments
 (0)