MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ await_suspend()

void MayaFlux::Kriya::FrameDelay::await_suspend ( std::coroutine_handle< Vruta::graphics_promise h)
noexcept

Definition at line 21 of file DelayAwaiters.cpp.

22{
23 if constexpr (std::is_same_v<promise_handle, Vruta::graphics_promise>
24 || std::is_same_v<promise_handle, Vruta::complex_promise>) {
25 if constexpr (requires { h.promise().next_frame; }) {
26 h.promise().next_frame += frames_to_wait;
27 h.promise().active_delay_context = Vruta::DelayContext::FRAME_BASED;
28 }
29 } else {
30 if constexpr (requires { h.promise().domain_mismatch_error("", ""); }) {
31 h.promise().domain_mismatch_error("FrameDelay",
32 "This awaitable is not compatible with the current coroutine promise type.");
33 }
34 }
35}
@ FRAME_BASED
Frame-rate delay (Graphics domain)

References MayaFlux::Vruta::FRAME_BASED.