Skip to content

Raise/lower volume #9

Open
Open
@bryal

Description

@bryal

It would be nice to be able to raise and lower the volume directly in Emacs, not having to open Pavucontrols or equivalent to manually change the volume of the process. Not sure if it would be easy to come up with a solution portable between all the backends though, but for MPV it can be done with the --input-ipc-server flag and ncat. Example:

$ mpv --input-ipc-server=/tmp/eradiosocket ...
$ echo 'add volume -10' | ncat -U /tmp/eradiosocket

I suppose the functions would look something like

(defun eradio-lower-volume ()
  (interactive)
  (message (shell-command-to-string "echo 'add volume -10' | ncat -U /tmp/eradiosocket")))

except they would do something different depending on the backend.

An alternative solution which would probably work for most situations could be to ask the user for volume when executing eradio-play and pass that along as a command line argument when starting the player process. For MPV, there's the --volume flag. This solution would not allow changing the volume without restarting the player, but that's not all that bothersome, so it would still be very useful.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions