mirror of https://github.com/polybar/polybar.git
fix(volume): Cleanup mixers on early destruct
This commit is contained in:
parent
1e5fc993a4
commit
04bd48d104
|
@ -44,6 +44,7 @@ namespace modules
|
|||
|
||||
public:
|
||||
explicit VolumeModule(std::string name);
|
||||
~VolumeModule();
|
||||
|
||||
bool has_event();
|
||||
bool update();
|
||||
|
|
|
@ -88,6 +88,15 @@ VolumeModule::VolumeModule(std::string name_) : EventModule(name_)
|
|||
// }}}
|
||||
}
|
||||
|
||||
VolumeModule::~VolumeModule()
|
||||
{
|
||||
std::lock_guard<concurrency::SpinLock> lck(this->update_lock);
|
||||
this->master_mixer.reset();
|
||||
this->speaker_mixer.reset();
|
||||
this->headphone_mixer.reset();
|
||||
this->headphone_ctrl.reset();
|
||||
}
|
||||
|
||||
bool VolumeModule::has_event()
|
||||
{
|
||||
bool has_event = false;
|
||||
|
|
Loading…
Reference in New Issue