@@ -60,28 +60,38 @@ class Pipewire: public QObject {
6060 Q_PROPERTY (ObjectModel<PwLinkGroupIface>* linkGroups READ linkGroups CONSTANT);
6161 // / The default audio sink (output) or `null`.
6262 // /
63+ // / This is the default sink currently in use by pipewire, and the one applications
64+ // / are currently using.
65+ // /
66+ // / To set the default sink, use @@preferredDefaultAudioSink.
67+ // /
6368 // / > [!INFO] When the default sink changes, this property may breifly become null.
6469 // / > This depends on your hardware.
6570 Q_PROPERTY (PwNodeIface* defaultAudioSink READ defaultAudioSink NOTIFY defaultAudioSinkChanged);
6671 // / The default audio source (input) or `null`.
6772 // /
73+ // / This is the default source currently in use by pipewire, and the one applications
74+ // / are currently using.
75+ // /
76+ // / To set the default source, use @@preferredDefaultAudioSource.
77+ // /
6878 // / > [!INFO] When the default source changes, this property may breifly become null.
6979 // / > This depends on your hardware.
7080 Q_PROPERTY (PwNodeIface* defaultAudioSource READ defaultAudioSource NOTIFY defaultAudioSourceChanged);
71- // / The configured default audio sink (output) or `null`.
81+ // / The preferred default audio sink (output) or `null`.
7282 // /
73- // / This is not the same as @@defaultAudioSink. While @@defaultAudioSink is the
74- // / sink that will be used by applications, @@defaultConfiguredAudioSink is the
75- // / sink requested to be the default by quickshell or another configuration tool,
76- // / which might not exist or be valid.
77- Q_PROPERTY (PwNodeIface* defaultConfiguredAudioSink READ defaultConfiguredAudioSink NOTIFY defaultConfiguredAudioSinkChanged);
78- // / The configured default audio source (input) or `null`.
83+ // / This is a hint to pipewire telling it which sink should be the default when possible.
84+ // / @@defaultAudioSink may differ when it is not possible for pipewire to pick this node.
7985 // /
80- // / This is not the same as @@defaultAudioSource. While @@defaultAudioSource is the
81- // / source that will be used by applications, @@defaultConfiguredAudioSource is the
82- // / source requested to be the default by quickshell or another configuration tool,
83- // / which might not exist or be valid.
84- Q_PROPERTY (PwNodeIface* defaultConfiguredAudioSource READ defaultConfiguredAudioSource NOTIFY defaultConfiguredAudioSourceChanged);
86+ // / See @@defaultAudioSink for the current default sink, regardless of preference.
87+ Q_PROPERTY (PwNodeIface* preferredDefaultAudioSink READ defaultConfiguredAudioSink WRITE setDefaultConfiguredAudioSink NOTIFY defaultConfiguredAudioSinkChanged);
88+ // / The preferred default audio source (input) or `null`.
89+ // /
90+ // / This is a hint to pipewire telling it which source should be the default when possible.
91+ // / @@defaultAudioSource may differ when it is not possible for pipewire to pick this node.
92+ // /
93+ // / See @@defaultAudioSource for the current default source, regardless of preference.
94+ Q_PROPERTY (PwNodeIface* preferredDefaultAudioSource READ defaultConfiguredAudioSource WRITE setDefaultConfiguredAudioSource NOTIFY defaultConfiguredAudioSourceChanged);
8595 // clang-format on
8696 QML_ELEMENT;
8797 QML_SINGLETON;
@@ -97,7 +107,10 @@ class Pipewire: public QObject {
97107 [[nodiscard]] PwNodeIface* defaultAudioSource () const ;
98108
99109 [[nodiscard]] PwNodeIface* defaultConfiguredAudioSink () const ;
110+ static void setDefaultConfiguredAudioSink (PwNodeIface* node);
111+
100112 [[nodiscard]] PwNodeIface* defaultConfiguredAudioSource () const ;
113+ static void setDefaultConfiguredAudioSource (PwNodeIface* node);
101114
102115signals:
103116 void defaultAudioSinkChanged ();
0 commit comments