12struct GlobalStreamInfo;
13struct GlobalGraphicsConfig;
43 std::shared_ptr<Nodes::NodeGraphManager> node_graph_manager,
44 std::shared_ptr<Buffers::BufferManager> buffer_manager,
45 std::shared_ptr<Vruta::TaskScheduler> task_scheduler,
46 std::shared_ptr<Core::WindowManager> window_manager =
nullptr);
58 template <
typename SType,
typename... Args>
61 auto subsystem = std::make_shared<SType>(std::forward<Args>(args)...);
62 add_subsystem(type, std::move(subsystem));
85 void start_all_subsystems();
88 void pause_all_subsystems();
91 void resume_all_subsystems();
101 std::shared_ptr<ISubsystem> get_subsystem(
SubsystemType type);
110 std::shared_ptr<AudioSubsystem> get_audio_subsystem();
119 std::shared_ptr<GraphicsSubsystem> get_graphics_subsystem();
146 void add_subsystem(
SubsystemType type,
const std::shared_ptr<ISubsystem>& subsystem);
164 std::unordered_map<SubsystemType, std::pair<bool, bool>> query_subsystem_status()
const;
177 template <
typename Func>
185 .Node = primary_tokens.
Node,
186 .Task = primary_tokens.
Task
191 m_node_graph_manager,
195 operation(temp_handle);
221 std::optional<std::span<const double>> read_cross_subsystem_buffer(
245 void unregister_process_hook(
SubsystemType type,
const std::string& name);
255 bool has_process_hook(
SubsystemType type,
const std::string& name);
274 std::unordered_map<SubsystemType, std::shared_ptr<ISubsystem>>
m_subsystems;
275 std::unordered_map<SubsystemType, std::unique_ptr<SubsystemProcessingHandle>>
m_handles;
std::shared_ptr< Buffers::BufferManager > m_buffer_manager
std::shared_ptr< Nodes::NodeGraphManager > m_node_graph_manager
std::shared_ptr< Vruta::TaskScheduler > m_task_scheduler
SubsystemTokens get_tokens_for_type(SubsystemType type) const
std::unordered_map< SubsystemType, std::unordered_set< SubsystemType > > m_cross_access_permissions
bool has_subsystem(SubsystemType type) const
Check if a subsystem type exists.
void execute_with_combined_tokens(SubsystemTokens primary_tokens, SubsystemTokens, Func operation)
Execute an operation with temporary elevated permissions.
std::shared_ptr< Core::WindowManager > m_window_manager
std::unordered_map< SubsystemType, std::unique_ptr< SubsystemProcessingHandle > > m_handles
void create_subsystem_internal(SubsystemType type, Args &&... args)
Internal template method for type-safe subsystem creation.
std::vector< SubsystemType > get_active_subsystem_types() const
Get all currently active subsystem types.
std::unordered_map< SubsystemType, std::shared_ptr< ISubsystem > > m_subsystems
std::shared_mutex m_mutex
Thread safety for subsystem operations.
Central coordinator for all subsystems in the MayaFlux processing architecture.
Unified interface combining buffer and node processing for subsystems.
std::function< void(unsigned int num_frames)> ProcessHook
Function type for process hooks that can be registered with the engine.
HookPosition
Defines the position in the processing cycle where a hook should be executed.
@ AudioSubsystem
Audio subsystem operations (backend, device, stream management)
@ GraphicsSubsystem
Graphics subsystem operations (Vulkan, rendering pipeline)
Comprehensive configuration for digital audio stream processing.
MayaFlux::Vruta::ProcessingToken Task
Processing token for task scheduling operations.
MayaFlux::Buffers::ProcessingToken Buffer
Processing token for buffer operations.
MayaFlux::Nodes::ProcessingToken Node
Processing token for node graph operations.
Processing token configuration for subsystem operation.