mirror of
https://github.com/polybar/polybar.git
synced 2024-11-18 13:55:11 -05:00
fix(alsa): Use proper speaker mixer name and soundcard
The old code causes a segmentation fault, if the speaker and headphone soundcards differ.
This commit is contained in:
parent
802a27177c
commit
f531613723
1 changed files with 1 additions and 1 deletions
|
@ -240,7 +240,7 @@ namespace modules {
|
||||||
}
|
}
|
||||||
if (m_mixer[mixer::SPEAKER] && !m_mixer[mixer::SPEAKER]->get_name().empty() && !headphones) {
|
if (m_mixer[mixer::SPEAKER] && !m_mixer[mixer::SPEAKER]->get_name().empty() && !headphones) {
|
||||||
mixers.emplace_back(new mixer_t::element_type(
|
mixers.emplace_back(new mixer_t::element_type(
|
||||||
string{m_mixer[mixer::SPEAKER]->get_name()}, string{m_mixer[mixer::HEADPHONE]->get_sound_card()}));
|
string{m_mixer[mixer::SPEAKER]->get_name()}, string{m_mixer[mixer::SPEAKER]->get_sound_card()}));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmd.compare(0, strlen(EVENT_TOGGLE_MUTE), EVENT_TOGGLE_MUTE) == 0) {
|
if (cmd.compare(0, strlen(EVENT_TOGGLE_MUTE), EVENT_TOGGLE_MUTE) == 0) {
|
||||||
|
|
Loading…
Reference in a new issue