aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/audio-volume-control/README
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-04-25 15:09:25 +0200
committerMattias Andrée <maandree@operamail.com>2015-04-25 15:09:25 +0200
commitbead40c7d0d8782f84749e610d2422b802101782 (patch)
treeb198c5df232ee7dae9302e704f6235b87fb84b38 /doc/examples/audio-volume-control/README
parentadd message length restriction and message format to readme (diff)
downloadbus-bead40c7d0d8782f84749e610d2422b802101782.tar.gz
bus-bead40c7d0d8782f84749e610d2422b802101782.tar.bz2
bus-bead40c7d0d8782f84749e610d2422b802101782.tar.xz
add example audio-volume-control
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'doc/examples/audio-volume-control/README')
-rw-r--r--doc/examples/audio-volume-control/README33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/examples/audio-volume-control/README b/doc/examples/audio-volume-control/README
new file mode 100644
index 0000000..f3864b7
--- /dev/null
+++ b/doc/examples/audio-volume-control/README
@@ -0,0 +1,33 @@
+Use-case example.
+
+Assume you have program that display the audio volume.
+This program checks every second third if the volume
+have changed.
+
+Also assume that you use amixer to change the volume,
+most often by using keybindings via xbindkeys.
+
+To reduce the delay, you want to send a signal to the
+monitor program that the volume have changed. For this
+more primitive IPC is sufficient, but lets assume there
+are other programs interested in this information too.
+
+To accomplish this, you create a wrapper for amixer
+than broadcasts updates on a bus. This wrapper is
+installed as ~/.local/bin/amixer, and ~/.local/bin/
+is included in $PATH before /usr/bin.
+
+
+
+Before starting run ~/.init, this code is
+should be run from your profile file if you
+want to implement this on your system.
+
+After running ~/.init, you can start one
+or more listeners by running ~/.alsa-monitor.
+
+To change the volume run
+`./amixer -c 0 -- set Master 5%+` or similar.
+
+When you are done run ~/.cleanup
+