I'm attaching two more patches: one to load sndioctl (this time with an appropriate comment), and a simple quoting style change since I was there.
Thanks :)
>From 63a12d7d764989b0496bfd55148ea121a5ca539e Mon Sep 17 00:00:00 2001 From: Omar Polo <[email protected]> Date: Fri, 10 Sep 2021 09:01:23 +0200 Subject: [PATCH 1/2] * emms-volume.el: check for sndioctl --- emms-volume.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/emms-volume.el b/emms-volume.el index bb92a31..ddb7c9a 100644 --- a/emms-volume.el +++ b/emms-volume.el @@ -52,6 +52,7 @@ (require 'emms-volume-amixer) (require 'emms-volume-pulse) (require 'emms-volume-mixerctl) +(require 'emms-volume-sndioctl) ;; Customize group (defgroup emms-volume nil @@ -61,6 +62,9 @@ ;; General volume setting related code. (defcustom emms-volume-change-function (cond + ;; check for sndioctl first to avoid picking up mixerctl or pactl + ;; on OpenBSD. + ((executable-find "sndioctl") 'emms-volume-sndioctl-change) ((executable-find "amixer") 'emms-volume-amixer-change) ((executable-find "pactl") 'emms-volume-pulse-change) ((executable-find "mixerctl") 'emms-volume-mixerctl-change) @@ -71,6 +75,7 @@ If you have your own functions for changing volume, set this." (const :tag "MPD" emms-volume-mpd-change) (const :tag "PulseAudio" emms-volume-pulse-change) (const :tag "Mixerctl" emms-volume-mixerctl-change) + (const :tag "Sndioctl" emms-volume-sndioctl-change) (function :tag "Lisp function"))) (defcustom emms-volume-change-amount 2 -- 2.33.0
>From da5f8620872c6565f169e429f9d45bcdf933663d Mon Sep 17 00:00:00 2001 From: Omar Polo <[email protected]> Date: Fri, 10 Sep 2021 09:03:09 +0200 Subject: [PATCH 2/2] * emms-volume.el: change quoting style to aid the compiler --- emms-volume.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/emms-volume.el b/emms-volume.el index ddb7c9a..dd40934 100644 --- a/emms-volume.el +++ b/emms-volume.el @@ -64,10 +64,10 @@ (cond ;; check for sndioctl first to avoid picking up mixerctl or pactl ;; on OpenBSD. - ((executable-find "sndioctl") 'emms-volume-sndioctl-change) - ((executable-find "amixer") 'emms-volume-amixer-change) - ((executable-find "pactl") 'emms-volume-pulse-change) - ((executable-find "mixerctl") 'emms-volume-mixerctl-change) + ((executable-find "sndioctl") #'emms-volume-sndioctl-change) + ((executable-find "amixer") #'emms-volume-amixer-change) + ((executable-find "pactl") #'emms-volume-pulse-change) + ((executable-find "mixerctl") #'emms-volume-mixerctl-change) (t #'(lambda (_amount) (user-error "%s" "No supported mixer found. Please, define ‘emms-volume-change-function’.")))) "The function to use to change the volume. If you have your own functions for changing volume, set this." -- 2.33.0
