Don’t err in pw-lib-default-playback-ports without default sink
This commit is contained in:
parent
cd1a8beeab
commit
36b66024ad
@ -152,10 +152,11 @@ version, call `pw-lib-refresh' first."
|
|||||||
|
|
||||||
(defun pw-lib-default-playback-ports ()
|
(defun pw-lib-default-playback-ports ()
|
||||||
"Return list of PipeWire objects that are default playback ports."
|
"Return list of PipeWire objects that are default playback ports."
|
||||||
(cl-remove-if-not #'(lambda (o)
|
(if-let ((sink (pw-lib-default-audio-sink)))
|
||||||
(if-let ((name (pw-lib-object-value o "port.name")))
|
(cl-remove-if-not #'(lambda (o)
|
||||||
(string-match "^playback" name)))
|
(if-let ((name (pw-lib-object-value o "port.name")))
|
||||||
(pw-lib-children (pw-lib-object-id (pw-lib-default-audio-sink)) "Port")))
|
(string-match "^playback" name)))
|
||||||
|
(pw-lib-children (pw-lib-object-id sink) "Port"))))
|
||||||
|
|
||||||
(defun pw-lib--volume-% (volume)
|
(defun pw-lib--volume-% (volume)
|
||||||
(when volume
|
(when volume
|
||||||
|
Loading…
Reference in New Issue
Block a user