MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Kriya::BufferDelay Struct Reference

Awaiter for suspending until a buffer cycle boundary. More...

#include <Awaiters.hpp>

+ Collaboration diagram for MayaFlux::Kriya::BufferDelay:

Public Types

using promise_handle = Vruta::audio_promise
 Type alias for the coroutine promise type.
 

Public Member Functions

 BufferDelay (uint64_t cycles)
 
constexpr bool await_ready () const noexcept
 
void await_suspend (std::coroutine_handle< promise_handle > h) noexcept
 
constexpr void await_resume () const noexcept
 

Public Attributes

uint64_t num_cycles
 

Detailed Description

Awaiter for suspending until a buffer cycle boundary.

Works identically to SampleDelay but at buffer cycle granularity. Accumulates cycles in promise.next_buffer_cycle.

Usage:

auto routine = []() -> SoundRoutine {
while (true) {
process_buffer();
co_await BufferDelay{2}; // Resume every 2 buffer cycles
}
};
Awaiter for suspending until a buffer cycle boundary.
Definition Awaiters.hpp:105

Definition at line 105 of file Awaiters.hpp.


The documentation for this struct was generated from the following file: