simplified vol_perc() (and with that config.def.h is super clean)

This commit is contained in:
Aaron Marcher 2016-09-13 21:08:44 +02:00 committed by Aaron Marcher (drkhsh)
parent 74b6e340f2
commit 87c1377b08
2 changed files with 2 additions and 5 deletions

View File

@ -1,8 +1,5 @@
/* See LICENSE file for copyright and license details. */ /* See LICENSE file for copyright and license details. */
/* alsa sound */
#define ALSA_CHANNEL "Master"
/* how often to update the statusbar (min value == 1) */ /* how often to update the statusbar (min value == 1) */
#define UPDATE_INTERVAL 1 #define UPDATE_INTERVAL 1

View File

@ -459,7 +459,7 @@ uid(void)
static char * static char *
vol_perc(const char *snd_card) vol_perc(const char *soundcard)
{ /* FIX THIS SHIT! */ { /* FIX THIS SHIT! */
long int vol, max, min; long int vol, max, min;
snd_mixer_t *handle; snd_mixer_t *handle;
@ -471,7 +471,7 @@ vol_perc(const char *snd_card)
snd_mixer_selem_register(handle, NULL, NULL); snd_mixer_selem_register(handle, NULL, NULL);
snd_mixer_load(handle); snd_mixer_load(handle);
snd_mixer_selem_id_malloc(&s_elem); snd_mixer_selem_id_malloc(&s_elem);
snd_mixer_selem_id_set_name(s_elem, ALSA_CHANNEL); snd_mixer_selem_id_set_name(s_elem, "Master");
elem = snd_mixer_find_selem(handle, s_elem); elem = snd_mixer_find_selem(handle, s_elem);
if (elem == NULL) { if (elem == NULL) {