When a control is removed, all bits are set so we need to test for that first.

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@819 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Pierre Ossman 2006-04-28 07:29:32 +00:00
parent 53930f4455
commit 6060bff186
2 changed files with 6 additions and 0 deletions

View file

@ -168,6 +168,9 @@ static int mixer_callback(snd_mixer_elem_t *elem, unsigned int mask) {
assert(u && u->mixer_handle);
if (mask == SND_CTL_EVENT_MASK_REMOVE)
return 0;
if (mask & SND_CTL_EVENT_MASK_VALUE) {
if (u->sink->get_hw_volume)
u->sink->get_hw_volume(u->sink);

View file

@ -168,6 +168,9 @@ static int mixer_callback(snd_mixer_elem_t *elem, unsigned int mask) {
assert(u && u->mixer_handle);
if (mask == SND_CTL_EVENT_MASK_REMOVE)
return 0;
if (mask & SND_CTL_EVENT_MASK_VALUE) {
if (u->source->get_hw_volume)
u->source->get_hw_volume(u->source);