diff --git a/include/adapters/pulseaudio.hpp b/include/adapters/pulseaudio.hpp index 4f5301a7..1e76df92 100644 --- a/include/adapters/pulseaudio.hpp +++ b/include/adapters/pulseaudio.hpp @@ -2,7 +2,6 @@ #include #include -#include #include "common.hpp" #include "settings.hpp" @@ -19,8 +18,6 @@ typedef struct pa_threaded_mainloop pa_threaded_mainloop; POLYBAR_NS class logger; -using mutex = std::mutex; - DEFINE_ERROR(pulseaudio_error); class pulseaudio { @@ -72,8 +69,6 @@ class pulseaudio { pa_threaded_mainloop* m_mainloop{nullptr}; queue m_events; - mutable mutex m_mutex; - // specified sink name string spec_s_name; diff --git a/src/adapters/pulseaudio.cpp b/src/adapters/pulseaudio.cpp index 75f7e1a5..c787649c 100644 --- a/src/adapters/pulseaudio.cpp +++ b/src/adapters/pulseaudio.cpp @@ -112,8 +112,6 @@ bool pulseaudio::wait() { * Process queued pulseaudio events */ int pulseaudio::process_events() { - std::lock_guard lock(m_mutex); - int ret = m_events.size(); pa_threaded_mainloop_lock(m_mainloop); pa_operation *o{nullptr}; @@ -248,7 +246,6 @@ void pulseaudio::subscribe_callback(pa_context *, pa_subscription_event_type_t t return; switch(t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) { case PA_SUBSCRIPTION_EVENT_SINK: - std::lock_guard lock(This->m_mutex); switch(t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) { case PA_SUBSCRIPTION_EVENT_NEW: This->m_events.emplace(evtype::NEW);