mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-30 06:32:36 +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);
|
std::unique_lock<std::recursive_mutex> lock(this->mutex);
|
||||||
this->bufferCondition.notify_all();
|
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() {
|
void PipeWireOut::Resume() {
|
||||||
this->state = State::Playing;
|
this->state = State::Playing;
|
||||||
|
|
||||||
{
|
{
|
||||||
std::unique_lock<std::recursive_mutex> lock(this->mutex);
|
std::unique_lock<std::recursive_mutex> lock(this->mutex);
|
||||||
this->bufferCondition.notify_all();
|
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) {
|
void PipeWireOut::SetVolume(double volume) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user