void MidiController::applyPreset(QList<QString> scriptPaths) { // Handles the engine Controller::applyPreset(scriptPaths); // Only execute this code if this is an output device if (isOutputDevice()) { if (m_outputs.count() > 0) { destroyOutputHandlers(); } createOutputHandlers(); updateAllOutputs(); } }
bool MidiController::applyPreset(QList<QString> scriptPaths, bool initializeScripts) { // Handles the engine bool result = Controller::applyPreset(scriptPaths, initializeScripts); // Only execute this code if this is an output device if (isOutputDevice()) { if (m_outputs.count() > 0) { destroyOutputHandlers(); } createOutputHandlers(); updateAllOutputs(); } return result; }
void AudioOutputDeviceManager::addDeviceEventProc( int _card , std::multimap< int, const AudioOutputDevice * > & _devices ) { if( _devices.find( _card ) != _devices.end() ) { return; } DeviceNameHints hints( _card ); const auto & HINTS = hints.get(); for( int i = 0 ; HINTS[ i ] != nullptr ; i++ ) { const auto HINT = HINTS[ i ]; if( isOutputDevice( HINT ) == false ) { continue; } DeviceDescription description( HINT ); DeviceName name( HINT ); const auto DEVICE = new AudioOutputDevice( description.get() , name.get() ); _devices.insert( std::multimap< int, const AudioOutputDevice * >::value_type( _card , DEVICE ) ); this->callConnectEventHandler( *DEVICE ); } }