13struct GlobalStreamInfo;
14struct GlobalGraphicsConfig;
15struct GlobalInputConfig;
16struct GlobalNetworkConfig;
47 std::shared_ptr<Nodes::NodeGraphManager> node_graph_manager,
48 std::shared_ptr<Buffers::BufferManager> buffer_manager,
49 std::shared_ptr<Vruta::TaskScheduler> task_scheduler,
50 std::shared_ptr<Core::WindowManager> window_manager =
nullptr,
51 std::shared_ptr<InputManager> input_manager =
nullptr);
63 template <
typename SType,
typename... Args>
66 auto subsystem = std::make_shared<SType>(std::forward<Args>(args)...);
67 add_subsystem(type, std::move(subsystem));
107 void start_all_subsystems();
110 void pause_all_subsystems();
113 void resume_all_subsystems();
123 std::shared_ptr<ISubsystem> get_subsystem(
SubsystemType type);
132 std::shared_ptr<AudioSubsystem> get_audio_subsystem();
141 std::shared_ptr<GraphicsSubsystem> get_graphics_subsystem();
159 std::shared_ptr<NetworkSubsystem> get_network_subsystem();
186 void add_subsystem(
SubsystemType type,
const std::shared_ptr<ISubsystem>& subsystem);
204 std::unordered_map<SubsystemType, std::pair<bool, bool>> query_subsystem_status()
const;
217 template <
typename Func>
225 .Node = primary_tokens.
Node,
226 .Task = primary_tokens.
Task
231 m_node_graph_manager,
237 operation(temp_handle);
266 std::optional<std::span<const double>> read_cross_subsystem_buffer(
290 void unregister_process_hook(
SubsystemType type,
const std::string& name);
300 bool has_process_hook(
SubsystemType type,
const std::string& name);
310 void stop_audio_subsystem();
313 void stop_graphics_subsystem();
316 void stop_input_subsystem();
329 std::unordered_map<SubsystemType, std::shared_ptr<ISubsystem>>
m_subsystems;
330 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.
std::shared_ptr< InputManager > m_input_manager
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)
@ NetworkSubsystem
Network subsystem operations (endpoint management, data routing)
@ GraphicsSubsystem
Graphics subsystem operations (Vulkan, rendering pipeline)
@ InputSubsystem
Input subsystem operations (device management, event dispatch)
const Core::InputSubsystem & get_input_subsystem()
Gets the input subsystem.
Configuration for the NetworkSubsystem.
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.