From: Jaroslav Kysela Date: Tue, 9 Dec 2003 09:48:28 +0000 (+0000) Subject: Fixed range problems X-Git-Tag: v1.0.3~66 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=f3da5548b34ed89c68aec4519ae63a6dbbde65f4;p=alsa-lib.git Fixed range problems --- diff --git a/src/mixer/simple.c b/src/mixer/simple.c index 4530a703..4097e246 100644 --- a/src/mixer/simple.c +++ b/src/mixer/simple.c @@ -1388,10 +1388,12 @@ void snd_mixer_selem_set_playback_volume_range(snd_mixer_elem_t *elem, selem_t *s; assert(elem); assert(elem->type == SND_MIXER_ELEM_SIMPLE); + assert(min < max); s = elem->private_data; s->str[PLAY].range = 1; s->str[PLAY].min = min; s->str[PLAY].max = max; + selem_read(elem); } /** @@ -1648,10 +1650,12 @@ void snd_mixer_selem_set_capture_volume_range(snd_mixer_elem_t *elem, selem_t *s; assert(elem); assert(elem->type == SND_MIXER_ELEM_SIMPLE); + assert(min < max); s = elem->private_data; s->str[CAPT].range = 1; s->str[CAPT].min = min; s->str[CAPT].max = max; + selem_read(elem); } /**