X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=osd-alsa.c;h=86155a3cb2216f568e61b8db70ee48a4b8f85097;hb=824cef024dae8ce3aac85219a28d2538e6c716d6;hp=3d7bc2731c91eec80c47f2ca5355c2af342786bd;hpb=390865c81e3eadcfc8ccac3b9cd0b4551f908b67;p=osdd.git diff --git a/osd-alsa.c b/osd-alsa.c index 3d7bc27..86155a3 100644 --- a/osd-alsa.c +++ b/osd-alsa.c @@ -12,6 +12,7 @@ #include #include +#include "util.h" #include "osd.h" static char *alsa_device = "default"; @@ -65,7 +66,7 @@ static int get_mute(void) for (snd_mixer_selem_channel_id_t ch=0; ch < SND_MIXER_SCHN_LAST; ch++) { int val; - if (snd_mixer_selem_get_playback_switch(elem, ch, &val)) + if (!snd_mixer_selem_get_playback_switch(elem, ch, &val)) { if (val) mute_off++; @@ -91,7 +92,7 @@ static long get_volume(long *pmin, long *pmax) for (snd_mixer_selem_channel_id_t ch=0; ch < SND_MIXER_SCHN_LAST; ch++) { long val; - if (snd_mixer_selem_get_playback_volume(elem, ch, &val)) + if (!snd_mixer_selem_get_playback_volume(elem, ch, &val)) { if (val > curr) curr = val; @@ -125,7 +126,6 @@ static void show_mixer(void) char buf[256]; snprintf(buf, sizeof(buf), "%s volume", mixer_control); osd_add_line(msg, NULL, buf); - osd_add_line(msg, NULL, ""); if (muted) osd_add_line(msg, NULL, "[mute]"); else if (min < max)