emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/listen 19dfc6a6e3 2/2: Add: (listen-mpv-volume)


From: ELPA Syncer
Subject: [elpa] externals/listen 19dfc6a6e3 2/2: Add: (listen-mpv-volume)
Date: Sun, 22 Sep 2024 15:58:25 -0400 (EDT)

branch: externals/listen
commit 19dfc6a6e329e8657a16d7420d5fc4148b9d00cd
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Add: (listen-mpv-volume)
    
    100% seems to be much too loud as a default, so we use 50%.
---
 listen-mpv.el | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/listen-mpv.el b/listen-mpv.el
index ad11027ca4..8702897761 100755
--- a/listen-mpv.el
+++ b/listen-mpv.el
@@ -30,6 +30,16 @@
 
 (require 'listen-lib)
 
+;;;; Customization
+
+(defgroup listen-mpv nil
+  "MPV-related options."
+  :group 'listen)
+
+(defcustom listen-mpv-volume 50
+  "Initial volume for MPV instance."
+  :type 'natnum)
+
 ;;;; Types
 
 (cl-defstruct
@@ -65,7 +75,8 @@
   "Ensure PLAYER is ready."
   (pcase-let* (((cl-struct listen-player command args process) player)
                (socket (make-temp-name (expand-file-name "listen-mpv-socket-" 
temporary-file-directory)))
-               (args (append args (list (format "--input-ipc-server=%s" 
socket)))))
+               (args (append args (list (format "--input-ipc-server=%s" socket)
+                                        (format "--volume=%s" 
listen-mpv-volume)))))
     (unless (process-live-p process)
       (let ((process-buffer (generate-new-buffer " *listen-player-mpv*"))
             (socket-buffer (generate-new-buffer " 
*listen-player-mpv-socket*")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]