diff --git a/Userland/Libraries/LibAudio/PlaybackStreamPulseAudio.cpp b/Userland/Libraries/LibAudio/PlaybackStreamPulseAudio.cpp index 17e2d1eaa6d..89ae851338d 100644 --- a/Userland/Libraries/LibAudio/PlaybackStreamPulseAudio.cpp +++ b/Userland/Libraries/LibAudio/PlaybackStreamPulseAudio.cpp @@ -45,7 +45,6 @@ ErrorOr> PlaybackStreamPulseAudio::create(OutputSt }, "Audio::PlaybackStream"sv)); - internal_state->set_thread(thread); thread->start(); thread->detach(); return playback_stream; @@ -136,12 +135,6 @@ ErrorOr PlaybackStreamPulseAudio::InternalState::check_is_running() return {}; } -void PlaybackStreamPulseAudio::InternalState::set_thread(NonnullRefPtr const& thread) -{ - Threading::MutexLocker locker { m_mutex }; - m_thread = thread; -} - void PlaybackStreamPulseAudio::InternalState::set_stream(NonnullRefPtr const& stream) { m_stream = stream; @@ -177,10 +170,6 @@ void PlaybackStreamPulseAudio::InternalState::thread_loop() } task(); } - - // Stop holding onto our thread so it can be deleted. - Threading::MutexLocker locker { m_mutex }; - m_thread = nullptr; } void PlaybackStreamPulseAudio::InternalState::exit() diff --git a/Userland/Libraries/LibAudio/PlaybackStreamPulseAudio.h b/Userland/Libraries/LibAudio/PlaybackStreamPulseAudio.h index 001149987f1..d1671944557 100644 --- a/Userland/Libraries/LibAudio/PlaybackStreamPulseAudio.h +++ b/Userland/Libraries/LibAudio/PlaybackStreamPulseAudio.h @@ -31,8 +31,6 @@ private: // the UI thread. class InternalState : public AtomicRefCounted { public: - void set_thread(NonnullRefPtr const&); - void set_stream(NonnullRefPtr const&); RefPtr stream(); @@ -49,8 +47,6 @@ private: Threading::ConditionVariable m_wake_condition { m_mutex }; Atomic m_exit { false }; - - RefPtr m_thread { nullptr }; }; PlaybackStreamPulseAudio(NonnullRefPtr);