MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ Init() [3/3]

void MayaFlux::Core::Engine::Init ( const GlobalStreamInfo streamInfo,
const GlobalGraphicsConfig graphics_config,
const GlobalInputConfig input_config,
const GlobalNetworkConfig network_config 
)

Initializes the processing engine with custom stream and graphics configurations.

Parameters
streamInfoConfiguration for sample rate, buffer size, and channels
graphics_configConfiguration for graphics/windowing backend
input_configConfiguration for input handling
network_configConfiguration for network subsystem

Configures the processing engine with the specified stream and graphics information. This method must be called before starting the engine.

Definition at line 104 of file Engine.cpp.

105{
107 m_stream_info = streamInfo;
108 m_graphics_config = graphics_config;
109 m_input_config = input_config;
110 m_network_config = network_config;
111
112 m_scheduler = std::make_shared<Vruta::TaskScheduler>(m_stream_info.sample_rate);
113 m_event_manager = std::make_shared<Vruta::EventManager>();
114 m_input_manager = std::make_shared<InputManager>();
115
116 m_buffer_manager = std::make_shared<Buffers::BufferManager>(
119 m_stream_info.sample_rate, m_stream_info.buffer_size);
120
121 m_node_graph_manager = std::make_shared<Nodes::NodeGraphManager>(
123
124 m_node_graph_manager->set_node_config(m_node_config);
125
126 m_io_manager = std::make_shared<IO::IOManager>(
128
130 m_window_manager = std::make_shared<WindowManager>(m_graphics_config);
131 } else {
132 MF_WARN(Journal::Component::Core, Journal::Context::Init, "No windowing backend selected - running in audio-only mode");
133 }
134
135 m_subsystem_manager = std::make_shared<SubsystemManager>(
137
138 m_subsystem_manager->create_audio_subsystem(m_stream_info);
139
140 m_subsystem_manager->create_graphics_subsystem(m_graphics_config);
141
142 m_subsystem_manager->create_network_subsystem(m_network_config);
143
144 m_subsystem_manager->create_input_subsystem(m_input_config);
145
146 m_buffer_manager->initialize_buffer_service();
147
148 m_is_initialized = true;
149
151}
#define MF_LOG(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
std::shared_ptr< SubsystemManager > m_subsystem_manager
Definition Engine.hpp:402
std::shared_ptr< IO::IOManager > m_io_manager
IO manager for video/audio loading and dispatch.
Definition Engine.hpp:406
GlobalNetworkConfig m_network_config
Network configuration.
Definition Engine.hpp:387
GlobalGraphicsConfig m_graphics_config
Graphics/windowing configuration.
Definition Engine.hpp:385
std::shared_ptr< Vruta::EventManager > m_event_manager
Event manager (currently only glfw events)
Definition Engine.hpp:404
std::shared_ptr< Buffers::BufferManager > m_buffer_manager
Buffer manager.
Definition Engine.hpp:401
GlobalStreamInfo m_stream_info
Stream configuration.
Definition Engine.hpp:384
std::shared_ptr< WindowManager > m_window_manager
Window manager (Windowing subsystem)
Definition Engine.hpp:403
std::shared_ptr< Vruta::TaskScheduler > m_scheduler
Task scheduler.
Definition Engine.hpp:399
std::shared_ptr< InputManager > m_input_manager
Input manager (HID/MIDI/etc.)
Definition Engine.hpp:405
Nodes::NodeConfig m_node_config
Node processing configuration.
Definition Engine.hpp:388
std::shared_ptr< Nodes::NodeGraphManager > m_node_graph_manager
Node graph manager.
Definition Engine.hpp:400
GlobalInputConfig m_input_config
Input configuration.
Definition Engine.hpp:386
@ Init
Engine/subsystem initialization.
@ Core
Core engine, backend, subsystems.
constexpr std::string_view enum_to_string(EnumType value) noexcept
Universal enum to string converter using magic_enum (original case)
@ NONE
No windowing (offscreen rendering only)
uint32_t target_frame_rate
Target frame rate for visual processing (Hz)
WindowingBackend windowing_backend
Selected windowing backend.
uint32_t channels
Number of discrete channels in this set.
bool enabled
Whether this channel set is active in the stream.
uint32_t buffer_size
Number of samples per processing block.
ChannelConfig input
Configuration for input signal channels (disabled by default)
uint32_t sample_rate
Number of samples processed per second (Hz)
ChannelConfig output
Configuration for output signal channels.

References MayaFlux::Core::GlobalStreamInfo::buffer_size, MayaFlux::Core::GlobalStreamInfo::ChannelConfig::channels, MayaFlux::Journal::Core, MayaFlux::Core::GlobalStreamInfo::ChannelConfig::enabled, MayaFlux::Reflect::enum_to_string(), MayaFlux::Journal::Init, MayaFlux::Core::GlobalStreamInfo::input, m_buffer_manager, m_event_manager, m_graphics_config, m_input_config, m_input_manager, m_io_manager, m_is_initialized, m_network_config, m_node_config, m_node_graph_manager, m_scheduler, m_stream_info, m_subsystem_manager, m_window_manager, MF_LOG, MF_WARN, MayaFlux::Core::GlobalGraphicsConfig::NONE, MayaFlux::Core::GlobalStreamInfo::output, MayaFlux::Core::GlobalStreamInfo::sample_rate, MayaFlux::Core::GlobalGraphicsConfig::target_frame_rate, and MayaFlux::Core::GlobalGraphicsConfig::windowing_backend.

+ Here is the call graph for this function: