diff --git a/src/plugins/pipewireout/PipeWireOut.cpp b/src/plugins/pipewireout/PipeWireOut.cpp index 71dcc2d3d..685ca9757 100644 --- a/src/plugins/pipewireout/PipeWireOut.cpp +++ b/src/plugins/pipewireout/PipeWireOut.cpp @@ -151,14 +151,31 @@ void PipeWireOut::Pause() { std::unique_lock lock(this->mutex); this->bufferCondition.notify_all(); } + + { + if (this->pwThreadLoop && this->pwStream) { + pw_thread_loop_lock(this->pwThreadLoop); + pw_stream_set_active(this->pwStream, false); + pw_thread_loop_unlock(this->pwThreadLoop); + } + } } void PipeWireOut::Resume() { this->state = State::Playing; + { std::unique_lock lock(this->mutex); this->bufferCondition.notify_all(); } + + { + if (this->pwThreadLoop && this->pwStream) { + pw_thread_loop_lock(this->pwThreadLoop); + pw_stream_set_active(this->pwStream, true); + pw_thread_loop_unlock(this->pwThreadLoop); + } + } } void PipeWireOut::SetVolume(double volume) {