MayaFlux 0.2.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 
)

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

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

Definition at line 87 of file Engine.cpp.

88{
90 m_stream_info = streamInfo;
91 m_graphics_config = graphics_config;
92
93 m_scheduler = std::make_shared<Vruta::TaskScheduler>(m_stream_info.sample_rate);
94 m_event_manager = std::make_shared<Vruta::EventManager>();
95
96 m_buffer_manager = std::make_shared<Buffers::BufferManager>(
99 m_stream_info.buffer_size);
100
101 m_node_graph_manager = std::make_shared<Nodes::NodeGraphManager>();
102
104 m_window_manager = std::make_shared<WindowManager>(m_graphics_config);
105 } else {
106 MF_WARN(Journal::Component::Core, Journal::Context::Init, "No windowing backend selected - running in audio-only mode");
107 }
108
109 m_subsystem_manager = std::make_shared<SubsystemManager>(
111
113
114 m_subsystem_manager->create_graphics_subsystem(m_graphics_config);
115
116 m_buffer_manager->initialize_buffer_service();
117
118 m_is_initialized = true;
119
120 MF_PRINT(Journal::Component::Core, Journal::Context::Init, "Audio backend: RtAudio, Sample rate: {}", m_stream_info.sample_rate);
121}
#define MF_PRINT(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
std::shared_ptr< SubsystemManager > m_subsystem_manager
Definition Engine.hpp:341
GlobalGraphicsConfig m_graphics_config
Graphics/windowing configuration.
Definition Engine.hpp:327
std::shared_ptr< Vruta::EventManager > m_event_manager
Event manager (currently only glfw events)
Definition Engine.hpp:343
std::shared_ptr< Buffers::BufferManager > m_buffer_manager
Buffer manager.
Definition Engine.hpp:340
GlobalStreamInfo m_stream_info
Stream configuration.
Definition Engine.hpp:326
std::shared_ptr< WindowManager > m_window_manager
Window manager (Windowing subsystem)
Definition Engine.hpp:342
std::shared_ptr< Vruta::TaskScheduler > m_scheduler
Task scheduler.
Definition Engine.hpp:338
std::shared_ptr< Nodes::NodeGraphManager > m_node_graph_manager
Node graph manager.
Definition Engine.hpp:339
@ Init
Engine/subsystem initialization.
@ Core
Core engine, backend, subsystems.
@ NONE
No windowing (offscreen rendering only)
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.
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::Journal::Init, MayaFlux::Core::GlobalStreamInfo::input, m_buffer_manager, m_event_manager, m_graphics_config, m_is_initialized, m_node_graph_manager, m_scheduler, m_stream_info, m_subsystem_manager, m_window_manager, MF_PRINT, MF_WARN, MayaFlux::Core::GlobalGraphicsConfig::NONE, MayaFlux::Core::GlobalStreamInfo::output, MayaFlux::Utils::RTAUDIO, MayaFlux::Core::GlobalStreamInfo::sample_rate, and MayaFlux::Core::GlobalGraphicsConfig::windowing_backend.