You are not logged in.

#1 2012-02-27 10:53:37

opticldelusion
Member
Registered: 2012-02-26
Posts: 5

volUp / volDown / mute events

Hi there,

i'm using alsa and pulseaudio and would like to execute a shell script whenever the user changes audio settings (mute and volume). Is that possible somehow?

I've already tried to listen to some key events, which basically works but is not an option cause the user could as well use some sort of software mixer.

Thanks in advance.

Offline

#2 2012-02-27 11:48:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,548
Website

Re: volUp / volDown / mute events

You can add udev rules to /lib/udev/rules.d/90-alsa-restore.rules for alsa.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-02-27 17:38:34

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: volUp / volDown / mute events

You can watch /dev/snd/controlC0 (or equivalent) for ACCESS or CLOSE_WRITE with inotifywait.

Offline

Board footer

Powered by FluxBB