Audio/Source/Virtual inputs are listed but cpal 0.18.2 cannot open them #344

Open
opened 2026-11-12 18:41:32 +00:00 by charles · 0 comments
Owner

Found while implementing Text chat 51 (#341).

Audio devices spec §3.1 lists Audio/Source/Virtual nodes as inputs (e.g. a soundboard virtual mic, EasyEffects-style virtual sources), and pipewire_devices::devices_from_nodes does so. But cpal 0.18.2's PipeWire host (src/host/pipewire/device.rs init_devices) only enumerates Audio/Sink, Audio/Source, Audio/Duplex, their /Internal variants and streams, so device_by_id("pipewire:<virtual source>") finds nothing even after the host is rebuilt: picking such an input gives HostError::DeviceNotAvailable, and the engine falls back to the default microphone.

Seen on Charles's desktop: linuxsoundboard.virtual_mic (Audio/Source/Virtual) is listed.

Options: drop Audio/Source/Virtual from the list until cpal supports it; open such nodes ourselves (a pw stream with target.object); or patch cpal upstream to include the class. Needs a decision.

Found while implementing Text chat 51 (#341). Audio devices spec §3.1 lists `Audio/Source/Virtual` nodes as inputs (e.g. a soundboard virtual mic, EasyEffects-style virtual sources), and `pipewire_devices::devices_from_nodes` does so. But cpal 0.18.2's PipeWire host (`src/host/pipewire/device.rs` `init_devices`) only enumerates `Audio/Sink`, `Audio/Source`, `Audio/Duplex`, their `/Internal` variants and streams, so `device_by_id("pipewire:<virtual source>")` finds nothing even after the host is rebuilt: picking such an input gives `HostError::DeviceNotAvailable`, and the engine falls back to the default microphone. Seen on Charles's desktop: `linuxsoundboard.virtual_mic` (Audio/Source/Virtual) is listed. Options: drop `Audio/Source/Virtual` from the list until cpal supports it; open such nodes ourselves (a pw stream with `target.object`); or patch cpal upstream to include the class. Needs a decision.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#344
No description provided.