Mercurial > audlegacy-plugins
changeset 2759:fd550b4fc79f
Also show indexed mixer elements in the ALSA plugin configuration UI,
patch based on one from nicholas@irc.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 02 Jul 2008 07:56:49 +0300 |
parents | cd2d2118fdee |
children | 35ac6cb80680 |
files | src/alsa/configure.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alsa/configure.c Mon Jun 30 23:52:43 2008 -0500 +++ b/src/alsa/configure.c Wed Jul 02 07:56:49 2008 +0300 @@ -112,10 +112,16 @@ while (current) { - const char *sname = snd_mixer_selem_get_name(current); if (snd_mixer_selem_is_active(current) && snd_mixer_selem_has_playback_volume(current)) - items = g_list_append(items, g_strdup(sname)); + { + const char *sname = snd_mixer_selem_get_name(current); + int index = snd_mixer_selem_get_index(current); + if (index) + items = g_list_append(items, g_strdup_printf("%s,%d", sname, index)); + else + items = g_list_append(items, g_strdup(sname)); + } current = snd_mixer_elem_next(current); }