885{
887
889 co_return;
890 }
891
893 uint32_t cycles_executed = 0;
894
895 while ((max_cycles == 0 || cycles_executed < max_cycles) && (
m_continuous_execution || cycles_executed < max_cycles)) {
896
897 if (promise.should_terminate) {
898 break;
899 }
900
903 }
904
907
910 continue;
911 }
912 }
913
915 continue;
916 }
917
918 uint32_t op_iterations = 1;
920 op_iterations = op.m_capture.get_cycle_count();
921 }
922
923 for (uint32_t iter = 0; iter < op_iterations; ++iter) {
924
927
930
934 }
935
936 break;
937 }
938
940 co_await BufferDelay { 1 };
941 } else if (samples_per_operation > 0) {
942 co_await SampleDelay { samples_per_operation };
943 }
944 }
945 }
946
950 }
951 }
952
954
957 }
958
960
962 cycles_executed++;
963 }
964}
@ 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::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)