aboutsummaryrefslogtreecommitdiff
path: root/elisp/emms-volume-sndioctl.el
diff options
context:
space:
mode:
authorBardofSprites <[email protected]>2024-09-29 14:24:31 -0400
committerBardofSprites <[email protected]>2024-09-29 14:24:31 -0400
commit7b7beacb673a85b11a6b45f597b4e074fc8b7e8d (patch)
tree2c00174cac3980f6e47c4f676d624ae0f222b364 /elisp/emms-volume-sndioctl.el
parentbc9371998c564a4161cafefc82dbc693a65dda37 (diff)
remove elisp dir
Diffstat (limited to 'elisp/emms-volume-sndioctl.el')
-rw-r--r--elisp/emms-volume-sndioctl.el72
1 files changed, 0 insertions, 72 deletions
diff --git a/elisp/emms-volume-sndioctl.el b/elisp/emms-volume-sndioctl.el
deleted file mode 100644
index 74ca4b3..0000000
--- a/elisp/emms-volume-sndioctl.el
+++ /dev/null
@@ -1,72 +0,0 @@
-;;; emms-volume-sndioctl.el --- a mode for changing volume using sndioctl -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2006, 2007, 2008, 2009, 2019 Free Software Foundation, Inc.
-
-;; Authors: Omar Polo <[email protected]>
-
-;; This file is part of EMMS.
-
-;; EMMS is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-;;
-;; EMMS is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with EMMS; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
-
-;;; Commentary:
-
-;; This file defines a few simple functions to raise or lower the
-;; volume using sndioctl. It can be used stand-alone, though it's
-;; meant for usage with EMMS, particularly with emms-volume.el
-
-;;; History:
-
-;; Sep 09 2021: Based on emms-volume-mixerctl.el by Omar Polo
-
-;;; Code:
-(require 'subr-x)
-
-(defcustom emms-volume-sndioctl-stream "output"
- "The stream to change the volume with.
-Usually it's the global \"output\". For a full list of available
-controls, run `sndioctl' in a shell."
- :type '(choice (const :tag "output" "output")
- (string :tag "Something else: "))
- :group 'emms-volume)
-
-(defcustom emms-volume-sndioctl-device nil
- "The card number to change volume.
-The card is identified by a number. For a full list run `ls
-/dev/mixer?*' in a shell."
- :type '(choice (const :tag "none" nil)
- (string :tag "Device: "))
- :group 'emms-volume)
-
-;;;###autoload
-(defun emms-volume-sndioctl-change (amount)
- "Change sndioctl level by AMOUNT."
- (message "Playback channels: %s"
- (with-temp-buffer
- (when (zerop
- (apply #'call-process
- "sndioctl" nil (current-buffer) nil
- `("-n"
- ,@(when emms-volume-sndioctl-device
- `("-f" ,emms-volume-sndioctl-device))
- ,(format "%s.level=%s%f"
- emms-volume-sndioctl-stream
- (if (> amount 0) "+" "")
- (/ (float amount) 100)))))
- (string-trim-right (buffer-string))))))
-
-(provide 'emms-volume-sndioctl)
-
-;;; emms-volume-sndioctl.el ends here