spoon

set dwm status
git clone git://git.2f30.org/spoon
Log | Files | Refs | LICENSE

commit 45e33c28830e3caf4850d7629db438adc1f28f7a
parent ad1bff15ed67e2462bf4d29cd8ab9a60d3e0dfc1
Author: Svyatoslav Mishyn <juef@openmailbox.org>
Date:   Tue, 24 Oct 2017 16:10:06 +0300

mix: do not hardcode controls IDs in TinyALSA interface

Diffstat:
Mmix.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mix.c b/mix.c @@ -183,8 +183,8 @@ mixread(void *arg, char *buf, size_t len) return -1; } - /* Master Playback Switch, see `tinymix contents` */ - if ((ctl = mixer_get_ctl(mixer, 10)) == NULL) { + if ((ctl = mixer_get_ctl_by_name(mixer, "Master Playback Switch")) + == NULL) { fprintf(stderr, "mixer_get_ctl_by_name() failed\n"); rc = -1; goto exit; @@ -194,8 +194,8 @@ mixread(void *arg, char *buf, size_t len) goto exit; } - /* Master Playback Volume, see `tinymix contents` */ - if ((ctl = mixer_get_ctl(mixer, 9)) == NULL) { + if ((ctl = mixer_get_ctl_by_name(mixer, "Master Playback Volume")) + == NULL) { fprintf(stderr, "mixer_get_ctl_by_name() failed\n"); rc = -1; goto exit;