aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--NEWS5
-rw-r--r--doc/emms.texinfo4
-rw-r--r--lisp/emms-volume.el10
4 files changed, 17 insertions, 3 deletions
diff --git a/AUTHORS b/AUTHORS
index 0816b56..ef24557 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -5,6 +5,7 @@ claims on sources, so please don't be too humble and add yourself.
Alex Kost <alezost@gmail.com>
Bram van der Kroef <bram@fortfrances.com>
+Bruno Félix R. Ribeiro <oitofelix@gnu.org>
Daimrod <daimrod@gmail.com>
Damien Elmes <emacs@repose.cx>
Daniel Brockman <daniel@brockman.se>
diff --git a/NEWS b/NEWS
index 2d75191..57c5340 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+News since version 5.2
+
+ - emms-volume-mixerctl.el: implementation for changing volume using
+ mixerctl.
+
News since version 5.1
- emms-browser.el: faster thumbnail cache lookups.
diff --git a/doc/emms.texinfo b/doc/emms.texinfo
index 0777e14..07e3741 100644
--- a/doc/emms.texinfo
+++ b/doc/emms.texinfo
@@ -2422,8 +2422,8 @@ value. So instead of pressing @kbd{C-c +} six times to increase volume
by six steps of @code{emms-volume-change-amount}, you would simply type
@kbd{C-c + + + + + +}.
-Emms can change volume with amixer, mpd, PulseAudio out of the box, see
-@var{emms-volume-change-function}.
+Emms can change volume with amixer, mpd, PulseAudio and mixerctl out
+of the box, see @var{emms-volume-change-function}.
@c -------------------------------------------------------------------
diff --git a/lisp/emms-volume.el b/lisp/emms-volume.el
index 917ab2d..99c8c28 100644
--- a/lisp/emms-volume.el
+++ b/lisp/emms-volume.el
@@ -3,6 +3,7 @@
;; Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: Martin Schoenmakers <aiviru@diamond-age.net>
+;; Bruno Félix Rezende Ribeiro <oitofelix@gnu.org>
;; This file is part of EMMS.
@@ -49,6 +50,8 @@
(require 'emms)
(require 'emms-playlist-mode)
(require 'emms-volume-amixer)
+(require 'emms-volume-pulse)
+(require 'emms-volume-mixerctl)
;; Customize group
(defgroup emms-volume nil
@@ -56,7 +59,12 @@
:group 'emms)
;; General volume setting related code.
-(defcustom emms-volume-change-function 'emms-volume-amixer-change
+(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)
+ ((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."
:type '(choice (const :tag "Amixer" emms-volume-amixer-change)