MayaFlux 0.1.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 82 of file Engine.cpp.

83{
85 m_stream_info = streamInfo;
86 m_graphics_config = graphics_config;
87
88 m_scheduler = std::make_shared<Vruta::TaskScheduler>(m_stream_info.sample_rate);
89 m_event_manager = std::make_shared<Vruta::EventManager>();
90
91 m_buffer_manager = std::make_shared<Buffers::BufferManager>(
94 m_stream_info.buffer_size);
95
96 m_node_graph_manager = std::make_shared<Nodes::NodeGraphManager>();
97
99 m_window_manager = std::make_shared<WindowManager>(m_graphics_config);
100 } else {
101 MF_WARN(Journal::Component::Core, Journal::Context::Init, "No windowing backend selected - running in audio-only mode");
102 }
103
104 m_subsystem_manager = std::make_shared<SubsystemManager>(
106
108
109 m_subsystem_manager->create_graphics_subsystem(m_graphics_config);
110
111 m_buffer_manager->initialize_buffer_service();
112
113 m_is_initialized = true;
114
115 MF_PRINT(Journal::Component::Core, Journal::Context::Init, "Audio backend: RtAudio, Sample rate: {}", m_stream_info.sample_rate);
116}
#define MF_PRINT(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
std::shared_ptr< SubsystemManager > m_subsystem_manager
Definition Engine.hpp:316
GlobalGraphicsConfig m_graphics_config
Graphics/windowing configuration.
Definition Engine.hpp:302
std::shared_ptr< Vruta::EventManager > m_event_manager
Event manager (currently only glfw events)
Definition Engine.hpp:318
std::shared_ptr< Buffers::BufferManager > m_buffer_manager
Buffer manager.
Definition Engine.hpp:315
GlobalStreamInfo m_stream_info
Stream configuration.
Definition Engine.hpp:301
std::shared_ptr< WindowManager > m_window_manager
Window manager (Windowing subsystem)
Definition Engine.hpp:317
std::shared_ptr< Vruta::TaskScheduler > m_scheduler
Task scheduler.
Definition Engine.hpp:313
std::shared_ptr< Nodes::NodeGraphManager > m_node_graph_manager
Node graph manager.
Definition Engine.hpp:314
@ 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.