Commit 351b39e0 authored by Max Kellermann's avatar Max Kellermann

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.
parent 3b6d4e66
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment