feat(audio): add guest voice controls and reliable lifecycle delivery
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
This commit is contained in:
@@ -75,11 +75,19 @@ impl<'a> VmFacade<'a> {
|
||||
if let Some(report) = &session.runtime.last_crash_report {
|
||||
return Err(report.clone());
|
||||
}
|
||||
if !platform.audio().lifecycle_ready() {
|
||||
return Ok(());
|
||||
}
|
||||
let reason = if !session.lifecycle_started {
|
||||
session.lifecycle_started = true;
|
||||
match session.vm.begin_lifecycle(role) {
|
||||
Ok(true) => None,
|
||||
Ok(false) => Some(LogicalFrameEndingReason::LifecycleComplete),
|
||||
Ok(false) => {
|
||||
// Optional hooks still form a successful lifecycle boundary.
|
||||
platform.audio_mut().begin_lifecycle();
|
||||
platform.audio_mut().finish_lifecycle(true);
|
||||
Some(LogicalFrameEndingReason::LifecycleComplete)
|
||||
}
|
||||
Err(error) => Some(LogicalFrameEndingReason::Panic(format!("{error:?}"))),
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user