100{
102
104 co_return;
105 }
106
108 uint32_t cycles_executed = 0;
109
110 while ((max_cycles == 0 || cycles_executed < max_cycles) && (
m_continuous_execution || cycles_executed < max_cycles)) {
111
112 if (promise.should_terminate) {
113 break;
114 }
115
118
121
123 continue;
124 }
125
127
128 for (uint32_t iter = 0; iter < op_iterations; ++iter) {
131 co_await BufferDelay { 1 };
133 co_await SampleDelay { samples_per_operation };
134 }
135 }
136
138 }
139
142
144 continue;
145 }
146
148 continue;
149 }
150
152 continue;
153 }
154
157
159 co_await BufferDelay { 1 };
161 co_await SampleDelay { samples_per_operation };
162 }
163 }
164
166
169 co_await BufferDelay { 1 };
170 } else {
171 co_await SampleDelay { 1 };
172 }
173 }
174
176
178 cycles_executed++;
179 }
180
183}
static bool is_capture_phase_operation(const BufferOperation &op)
static bool is_process_phase_operation(const BufferOperation &op)
@ READY
Data ready for processing.
@ CONSUMED
Data has been processed.
@ EMPTY
No data available.
Vruta::DelayContext m_process_timing
uint32_t operation_iterations(const BufferOperation &op) const
void process_operation(BufferOperation &op, uint64_t cycle)
Vruta::DelayContext m_capture_timing
std::vector< BufferOperation > m_operations
std::vector< DataState > m_data_states
bool m_continuous_execution
static bool any_active(const std::vector< std::shared_ptr< Vruta::Routine > > &tasks)
std::function< void()> m_on_complete
bool operation_due(const BufferOperation &op) const
std::vector< std::shared_ptr< Vruta::Routine > > dispatch_cycle_branches(bool frame_rate)
GetPromiseBase< Vruta::audio_promise > GetAudioPromise
Audio domain promise accessor.
@ SAMPLE_BASED
Sample-accurate delay (audio domain)
@ BUFFER_BASED
Buffer-cycle delay (audio hardware boundary)