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

◆ create_virtual_port_if_enabled()

void MayaFlux::Core::MIDIBackend::create_virtual_port_if_enabled ( )
private

Definition at line 340 of file MIDIBackend.cpp.

341{
343 return;
344 }
345
346 try {
347 uint32_t dev_id = 0;
348
349 MIDIPortInfo info {};
350 info.id = dev_id;
351 info.name = m_config.virtual_port_name;
352 info.backend_type = InputType::MIDI;
353 info.is_connected = true;
354 info.is_input = true;
355 info.is_output = false;
356 info.port_number = 255; // Special marker for virtual port
357 info.rtmidi_port_number = 0;
358
359 m_enumerated_devices[dev_id] = info;
360
362 "Created virtual MIDI port: {}", m_config.virtual_port_name);
363
364 } catch (const RtMidiError& error) {
366 "Failed to create virtual MIDI port: {}", error.getMessage());
367 }
368}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
std::unordered_map< uint32_t, MIDIPortInfo > m_enumerated_devices
@ MIDI
MIDI controllers and instruments.
@ InputBackend
Input device backend (HID, MIDI, OSC)
void error(Component component, Context context, std::source_location location, std::string_view message)
Log an error message and optionally throw an exception.
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Core::MIDIBackend::Config::enable_virtual_port, MayaFlux::Core::InputDeviceInfo::id, MayaFlux::Journal::InputBackend, m_config, m_enumerated_devices, MF_ERROR, MF_INFO, MayaFlux::Core::MIDI, and MayaFlux::Core::MIDIBackend::Config::virtual_port_name.

Referenced by initialize().

+ Here is the caller graph for this function: