Silence compilation warnings about unused variables
This commit is contained in:
parent
6041fcdc0b
commit
08c9d50a1c
10
pw-access.el
10
pw-access.el
@ -123,7 +123,7 @@ Note this interface may not work with all PipeWire versions.")
|
|||||||
(push (cons id properties) objects)))
|
(push (cons id properties) objects)))
|
||||||
(nreverse objects)))
|
(nreverse objects)))
|
||||||
|
|
||||||
(cl-defmethod pw-access-objects ((class pw-cli-accessor))
|
(cl-defmethod pw-access-objects ((_class pw-cli-accessor))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(pw-cli--command pw-cli-command '("list-objects"))
|
(pw-cli--command pw-cli-command '("list-objects"))
|
||||||
(pw-cli--parse-list)))
|
(pw-cli--parse-list)))
|
||||||
@ -166,7 +166,7 @@ Note this interface may not work with all PipeWire versions.")
|
|||||||
(push (cons property value) properties))))
|
(push (cons property value) properties))))
|
||||||
properties))
|
properties))
|
||||||
|
|
||||||
(cl-defmethod pw-access-properties ((class pw-cli-accessor) node-id)
|
(cl-defmethod pw-access-properties ((_class pw-cli-accessor) node-id)
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(pw-cli--command pw-cli-command `("enum-params" ,(number-to-string node-id) "Props"))
|
(pw-cli--command pw-cli-command `("enum-params" ,(number-to-string node-id) "Props"))
|
||||||
(pw-cli--parse-properties)))
|
(pw-cli--parse-properties)))
|
||||||
@ -183,11 +183,11 @@ Note this interface may not work with all PipeWire versions.")
|
|||||||
(defun pw-cli--format-property (property)
|
(defun pw-cli--format-property (property)
|
||||||
(format "%s: %s" (car property) (pw-cli--format-property-value (cdr property))))
|
(format "%s: %s" (car property) (pw-cli--format-property-value (cdr property))))
|
||||||
|
|
||||||
(cl-defmethod pw-access-set-properties ((class pw-cli-accessor) node-id properties)
|
|
||||||
(let* ((formatted (mapconcat #'pw-cli--format-property properties ", "))
|
(let* ((formatted (mapconcat #'pw-cli--format-property properties ", "))
|
||||||
(props (concat "{ " formatted " }")))
|
(props (concat "{ " formatted " }")))
|
||||||
(call-process pw-cli-command nil pw-cli-command nil
|
(call-process pw-cli-command nil pw-cli-command nil
|
||||||
"set-param" (number-to-string node-id) "Props" props)))
|
"set-param" (number-to-string node-id) "Props" props)))
|
||||||
|
(cl-defmethod pw-access-set-properties ((_class pw-cli-accessor) node-id properties)
|
||||||
|
|
||||||
(defun pw-cli--parse-metadata ()
|
(defun pw-cli--parse-metadata ()
|
||||||
(let ((metadata '()))
|
(let ((metadata '()))
|
||||||
@ -197,12 +197,12 @@ Note this interface may not work with all PipeWire versions.")
|
|||||||
(push (cons (match-string 1) (match-string 3)) metadata))
|
(push (cons (match-string 1) (match-string 3)) metadata))
|
||||||
metadata))
|
metadata))
|
||||||
|
|
||||||
(cl-defmethod pw-access-defaults ((class pw-cli-accessor))
|
(cl-defmethod pw-access-defaults ((_class pw-cli-accessor))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(pw-cli--command pw-cli-metadata-command '("0"))
|
(pw-cli--command pw-cli-metadata-command '("0"))
|
||||||
(pw-cli--parse-metadata)))
|
(pw-cli--parse-metadata)))
|
||||||
|
|
||||||
(cl-defmethod pw-access-set-default ((class pw-cli-accessor) property node-name)
|
(cl-defmethod pw-access-set-default ((_class pw-cli-accessor) property node-name)
|
||||||
(call-process pw-cli-metadata-command nil pw-cli-metadata-command nil
|
(call-process pw-cli-metadata-command nil pw-cli-metadata-command nil
|
||||||
"0" property (format "{ \"name\": \"%s\" }" node-name)))
|
"0" property (format "{ \"name\": \"%s\" }" node-name)))
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ version, call `pw-lib-refresh' first."
|
|||||||
Applicable only to Nodes and Ports.
|
Applicable only to Nodes and Ports.
|
||||||
If REFRESH is non-nil then retrive fresh information from PipeWire
|
If REFRESH is non-nil then retrive fresh information from PipeWire
|
||||||
rather than using cached data to obtain the result."
|
rather than using cached data to obtain the result."
|
||||||
(cl-destructuring-bind (node-p parameters monitor-p node-id port-id)
|
(cl-destructuring-bind (_node-p parameters monitor-p _node-id _port-id)
|
||||||
(pw-lib--object-parameters object refresh)
|
(pw-lib--object-parameters object refresh)
|
||||||
(eq (cdr (assoc (if monitor-p "monitorMute" "mute") parameters)) 'true)))
|
(eq (cdr (assoc (if monitor-p "monitorMute" "mute") parameters)) 'true)))
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ Return the new boolean mute status of OBJECT.
|
|||||||
Applicable only to Nodes and Ports.
|
Applicable only to Nodes and Ports.
|
||||||
If REFRESH is non-nil then retrive fresh information from PipeWire
|
If REFRESH is non-nil then retrive fresh information from PipeWire
|
||||||
rather than using cached data to obtain the result."
|
rather than using cached data to obtain the result."
|
||||||
(cl-destructuring-bind (node-p parameters monitor-p node-id port-id)
|
(cl-destructuring-bind (_node-p _parameters monitor-p node-id _port-id)
|
||||||
(pw-lib--object-parameters object refresh)
|
(pw-lib--object-parameters object refresh)
|
||||||
(let* ((mute (not (pw-lib-muted-p object)))
|
(let* ((mute (not (pw-lib-muted-p object)))
|
||||||
(property (if monitor-p "monitorMute" "mute"))
|
(property (if monitor-p "monitorMute" "mute"))
|
||||||
@ -221,7 +221,7 @@ The returned value is an integer in the range 0-100.
|
|||||||
Applicable only to Nodes and Ports.
|
Applicable only to Nodes and Ports.
|
||||||
If REFRESH is non-nil then retrive fresh information from PipeWire
|
If REFRESH is non-nil then retrive fresh information from PipeWire
|
||||||
rather than using cached data to obtain the result."
|
rather than using cached data to obtain the result."
|
||||||
(cl-destructuring-bind (node-p parameters monitor-p node-id port-id)
|
(cl-destructuring-bind (node-p parameters monitor-p _node-id port-id)
|
||||||
(pw-lib--object-parameters object refresh)
|
(pw-lib--object-parameters object refresh)
|
||||||
(pw-lib--volume-%
|
(pw-lib--volume-%
|
||||||
(if node-p
|
(if node-p
|
||||||
|
2
pw-ui.el
2
pw-ui.el
@ -129,7 +129,7 @@ The indicator is displayed only on graphical terminals."
|
|||||||
(defun pw-ui--insert-line (line object)
|
(defun pw-ui--insert-line (line object)
|
||||||
(insert (propertize line 'pw-object-id (pw-lib-object-id object)) "\n"))
|
(insert (propertize line 'pw-object-id (pw-lib-object-id object)) "\n"))
|
||||||
|
|
||||||
(defun pipewire-refresh (&optional ignore-auto noconfirm)
|
(defun pipewire-refresh (&optional _ignore-auto _noconfirm)
|
||||||
"Refresh PipeWire buffer."
|
"Refresh PipeWire buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(when (and (not (eq major-mode 'pipewire-mode))
|
(when (and (not (eq major-mode 'pipewire-mode))
|
||||||
|
Loading…
Reference in New Issue
Block a user