File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,18 +168,21 @@ void ControllerManager::slotInitialize() {
168168
169169 // Instantiate all enumerators. Enumerators can take a long time to
170170 // construct since they interact with host MIDI APIs.
171+ {
172+ auto locker = lockMutex (&m_mutex);
171173#ifdef __PORTMIDI__
172- m_enumerators.push_back (std::make_unique<PortMidiEnumerator>(m_pConfig));
174+ m_enumerators.push_back (std::make_unique<PortMidiEnumerator>(m_pConfig));
173175#endif
174176#ifdef __HSS1394__
175- m_enumerators.push_back (std::make_unique<Hss1394Enumerator>());
177+ m_enumerators.push_back (std::make_unique<Hss1394Enumerator>());
176178#endif
177179#ifdef __BULK__
178- m_enumerators.push_back (std::make_unique<BulkEnumerator>());
180+ m_enumerators.push_back (std::make_unique<BulkEnumerator>());
179181#endif
180182#ifdef __HID__
181- m_enumerators.push_back (std::make_unique<HidEnumerator>());
183+ m_enumerators.push_back (std::make_unique<HidEnumerator>());
182184#endif
185+ } // Mutex locker released here
183186 emit initialized ();
184187}
185188
You can’t perform that action at this time.
0 commit comments