mixer/alsa: skip the snd_mixer_handle_events() call in alsa_mixer_elem_callback()

snd_mixer_handle_events() has already been called by
DispatchSockets().  This way, we can also skip the exception handler.
This commit is contained in:
Max Kellermann 2021-08-06 17:59:26 +02:00
parent 3b6d4e6673
commit 351b39e0c5

View File

@ -166,11 +166,8 @@ AlsaMixer::ElemCallback(snd_mixer_elem_t *elem, unsigned mask) noexcept
snd_mixer_elem_get_callback_private(elem);
if (mask & SND_CTL_EVENT_MASK_VALUE) {
try {
int volume = mixer.GetVolume();
mixer.listener.OnMixerVolumeChanged(mixer, volume);
} catch (...) {
}
int volume = mixer.GetPercentVolume();
mixer.listener.OnMixerVolumeChanged(mixer, volume);
}
return 0;