#include <getopt.h>
#include <alsa/asoundlib.h>
+#include "util.h"
#include "osd.h"
static char *alsa_device = "default";
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++;
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;
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)