Pipewire: auto change default_output/default_input connected nodes when the default devices are changed in system audio settings

This commit is contained in:
dec05eba
2025-02-27 01:43:16 +01:00
parent d9eb44fae0
commit ae2929d4f7
4 changed files with 404 additions and 104 deletions

View File

@@ -62,6 +62,8 @@ typedef enum {
/*
Get a sound device by name, returning the device into the |device| parameter.
|device_name| can be a device name or "default_output" or "default_input".
If the device name is "default_output" or "default_input" then it will automatically switch which
device is records from when the default output/input is changed in the system audio settings.
Returns 0 on success, or a negative value on failure.
*/
int sound_device_get_by_name(SoundDevice *device, const char *device_name, const char *description, unsigned int num_channels, unsigned int period_frame_size, AudioFormat audio_format);