mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-16 04:14:05 +00:00
Fix pause/resume in PipeWireOut
This commit is contained in:
parent
a602b0efaf
commit
95564ef5cd
@ -151,14 +151,31 @@ void PipeWireOut::Pause() {
|
||||
std::unique_lock<std::recursive_mutex> 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<std::recursive_mutex> 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user