skip encoding when session paused

this is already done by `offset_est.reset()` as a
side-effect but it's implemented formally in case
that breaks by future changes.
This commit is contained in:
caszuu
2026-02-27 16:03:18 +01:00
committed by xytovl
parent a8504545e9
commit 5b6e172b41
3 changed files with 24 additions and 4 deletions
+7 -2
View File
@@ -417,9 +417,14 @@ void wivrn_session::pause_session()
}
// pause session components
worker_thread = std::jthread();
offset_est.reset();
worker_thread = std::jthread();
{
std::shared_lock lock(comp_target_mutex);
if (comp_target)
comp_target->pause();
}
}
void wivrn_session::resume_session()
@@ -449,7 +454,7 @@ void wivrn_session::resume_session()
{
std::shared_lock lock(comp_target_mutex);
if (comp_target)
comp_target->reset_encoders();
comp_target->resume();
}
worker_thread = std::jthread([this](std::stop_token stop) { return run_worker(stop); });