7 if constexpr (std::is_same_v<promise_handle, Vruta::audio_promise>) {
8 h.promise().next_sample += samples_to_wait;
11 if constexpr (
requires {
h.promise().domain_mismatch_error(
"",
""); }) {
12 h.promise().domain_mismatch_error(
"SampleDelay",
13 "This awaitable is not compatible with the current coroutine promise type.");
20 if constexpr (std::is_same_v<promise_handle, Vruta::graphics_promise>) {
21 if constexpr (
requires {
h.promise().next_frame; }) {
22 h.promise().next_frame += frames_to_wait;
26 if constexpr (
requires {
h.promise().domain_mismatch_error(
"",
""); }) {
27 h.promise().domain_mismatch_error(
"FrameDelay",
28 "This awaitable is not compatible with the current coroutine promise type.");
35 auto& promise =
h.promise();
36 promise.next_sample.fetch_add(samples_to_wait, std::memory_order_relaxed);
37 promise.next_frame.fetch_add(frames_to_wait, std::memory_order_relaxed);
38 promise.sample_delay_amount = samples_to_wait;
39 promise.frame_delay_amount = frames_to_wait;
40 promise.active_delay_context.store(