931{
933
935 co_return;
936 }
937
939 uint32_t cycles_executed = 0;
940
941 while ((max_cycles == 0 || cycles_executed < max_cycles) && (
m_continuous_execution || cycles_executed < max_cycles)) {
942
943 if (promise.should_terminate) {
944 break;
945 }
946
949 }
950
953
956 continue;
957 }
958 }
959
961 continue;
962 }
963
964 uint32_t op_iterations = 1;
966 op_iterations = op.m_capture.get_cycle_count();
967 }
968
969 for (uint32_t iter = 0; iter < op_iterations; ++iter) {
970
973
976
980 }
981
982 break;
983 }
984
986 co_await BufferDelay { 1 };
987 } else if (samples_per_operation > 0) {
988 co_await SampleDelay { samples_per_operation };
989 }
990 }
991 }
992
996 }
997 }
998
1000
1003 }
1004
1006
1008 cycles_executed++;
1009 }
1010
1013}
@ 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)