945{
947
949 co_return;
950 }
951
953 uint32_t cycles_executed = 0;
954
955 while ((max_cycles == 0 || cycles_executed < max_cycles) && (
m_continuous_execution || cycles_executed < max_cycles)) {
956
957 if (promise.should_terminate) {
958 break;
959 }
960
963 }
964
967
970 continue;
971 }
972 }
973
975 continue;
976 }
977
978 uint32_t op_iterations = 1;
980 op_iterations = op.m_capture.get_cycle_count();
981 }
982
983 for (uint32_t iter = 0; iter < op_iterations; ++iter) {
984
987
990
994 }
995
996 break;
997 }
998
1000 co_await BufferDelay { 1 };
1001 } else if (samples_per_operation > 0) {
1002 co_await SampleDelay { samples_per_operation };
1003 }
1004 }
1005 }
1006
1010 }
1011 }
1012
1014
1017 }
1018
1020
1022 cycles_executed++;
1023 }
1024
1027}
@ CONDITION
Conditional operation for branching logic.
@ CAPTURE
Capture data from source buffer using BufferCapture strategy.
static bool is_process_phase_operation(const BufferOperation &op)
@ READY
Data ready for processing.
@ EMPTY
No data available.
void cleanup_completed_branches()
void process_operation(BufferOperation &op, uint64_t cycle)
Vruta::DelayContext m_capture_timing
std::vector< BranchInfo > m_branches
std::vector< BufferOperation > m_operations
std::vector< DataState > m_data_states
void cleanup_expired_data()
std::function< void(uint32_t)> m_cycle_end_callback
bool m_continuous_execution
std::function< void(uint32_t)> m_cycle_start_callback
std::function< void()> m_on_complete
std::shared_ptr< Vruta::SoundRoutine > dispatch_branch_async(BranchInfo &branch, uint64_t cycle)
GetPromiseBase< Vruta::audio_promise > GetAudioPromise
Audio domain promise accessor.
@ BUFFER_BASED
Buffer-cycle delay (audio hardware boundary)