diff options
author | Yoni Rabkin <yoni@rabkins.net> | 2021-09-11 16:26:36 -0400 |
---|---|---|
committer | Yoni Rabkin <yoni@rabkins.net> | 2021-09-11 16:26:36 -0400 |
commit | bc0d2ec1ba99409421d3f75aae315e10b5014b31 (patch) | |
tree | bd62a03b13a04061767639ffc1e8451d1a7c7690 | |
parent | 1cbc3af9d48b3b79b8bd274a5dcde793dbb4c9f3 (diff) |
* emms-volume.el: load sndioctl
load sndioctl and use correct quoting style
-rw-r--r-- | emms-volume.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/emms-volume.el b/emms-volume.el index bb92a31..dd40934 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,9 +62,12 @@ ;; General volume setting related code. (defcustom emms-volume-change-function (cond - ((executable-find "amixer") 'emms-volume-amixer-change) - ((executable-find "pactl") 'emms-volume-pulse-change) - ((executable-find "mixerctl") 'emms-volume-mixerctl-change) + ;; 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) (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." @@ -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 |