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

◆ shutdown()

void MayaFlux::Core::MIDIBackend::shutdown ( )
overridevirtual

Shutdown and release all resources.

Closes all devices and releases backend resources. After this call, initialize() must be called again to use the backend.

Implements MayaFlux::Core::IInputBackend.

Definition at line 114 of file MIDIBackend.cpp.

115{
116 if (!m_initialized.load()) {
117 return;
118 }
119
120 stop();
121
122 {
123 std::lock_guard lock(m_devices_mutex);
124 m_open_devices.clear();
125 m_enumerated_devices.clear();
126 }
127
128 m_initialized.store(false);
129
131 "MIDIBackend shutdown complete");
132}
#define MF_INFO(comp, ctx,...)
std::unordered_map< uint32_t, MIDIPortInfo > m_enumerated_devices
std::unordered_map< uint32_t, std::shared_ptr< MIDIPortState > > m_open_devices
std::atomic< bool > m_initialized
void stop() override
Stop listening for input events.
@ InputBackend
Input device backend (HID, MIDI, OSC)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Journal::InputBackend, m_devices_mutex, m_enumerated_devices, m_initialized, m_open_devices, MF_INFO, and stop().

Referenced by ~MIDIBackend().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: