From 95d63d436e6820354a89a05dff349c65190a18a2 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Thu, 1 Dec 2022 09:28:54 -0500 Subject: add pamix console --- emacsconf-hyperlist.el | 2 +- emacsconf-stream.el | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/emacsconf-hyperlist.el b/emacsconf-hyperlist.el index 8cc8032..56114c3 100644 --- a/emacsconf-hyperlist.el +++ b/emacsconf-hyperlist.el @@ -23,7 +23,7 @@ (defun emacsconf-hyperlist-audio (source) (format - "%s: pamix (F3 output) [[elisp:(emacsconf-stream-audio-quieter \"${track}\" \"%s\")][quieter]] [[elisp:(emacsconf-stream-audio-louder \"${track}\" \"%s\")][louder]] %s" + "%s: [[elisp:(emacsconf-stream-audio-mixer \"${track}\")][mixer (F3 output)]] [[elisp:(emacsconf-stream-audio-quieter \"${track}\" \"%s\")][quieter]] [[elisp:(emacsconf-stream-audio-louder \"${track}\" \"%s\")][louder]] %s" source source source (mapconcat (lambda (val) diff --git a/emacsconf-stream.el b/emacsconf-stream.el index c49ec90..9d14696 100644 --- a/emacsconf-stream.el +++ b/emacsconf-stream.el @@ -908,6 +908,30 @@ ffplay URL "pactl list sinks | perl -000ne 'if(/%s/){/Volume:.*?([0-9]+%%)/;print \"$1\n\"}'" source))))) +(defvar emacsconf-stream-console '("konsole" "-e")) +(defvar emacsconf-stream-mixer "pamix") + +(defun emacsconf-stream-audio-mixer (track) + (interactive (list (emacsconf-complete-track))) + (setq track (emacsconf-get-track track)) + (let ((info (tramp-dissect-file-name (emacsconf-stream-track-login track)))) + (apply + #'start-process + (delq nil + (append + (list + (concat "mixer-" (plist-get track :id)) + (concat "*" (plist-get track :name) "*")) + emacsconf-stream-console + (list + "ssh" + "-t" + (concat (tramp-file-name-user info) + "@" (tramp-file-name-host info)) + "-p" (tramp-file-name-port info) + (format "DISPLAY=%s" (plist-get track :vnc-display)) + emacsconf-stream-mixer)))))) + ;; (emacsconf-stream-audio-get-volume "General" "qa") ;; (emacsconf-stream-audio-louder "General" "qa") ;; (emacsconf-stream-audio-quieter "General" "qa") -- cgit v1.2.3