diff --git a/src/modules/alsa.cpp b/src/modules/alsa.cpp index da432494..7a886ba4 100644 --- a/src/modules/alsa.cpp +++ b/src/modules/alsa.cpp @@ -235,24 +235,27 @@ namespace modules { if (!m_mixer[mixer::MASTER]) { return; } - auto mixers = get_mixers(); + const auto& mixers = get_mixers(); for (auto&& mixer : mixers) { mixer->set_mute(m_muted || mixers[0]->is_muted()); } + + action_epilogue(mixers); } void alsa_module::change_volume(int interval) { if (!m_mixer[mixer::MASTER]) { return; } - auto mixers = get_mixers(); + const auto& mixers = get_mixers(); for (auto&& mixer : mixers) { m_mapped ? mixer->set_normalized_volume(math_util::cap(mixer->get_normalized_volume() + interval, 0, 100)) : mixer->set_volume(math_util::cap(mixer->get_volume() + interval, 0, 100)); } + action_epilogue(mixers); } - void action_epilogue(const vector& mixers) { + void alsa_module::action_epilogue(const vector& mixers) { for (auto&& mixer : mixers) { if (mixer->wait(0)) { mixer->process_events();