Fixed re-enumeration of static devices

pull/60/head
f4exb 2017-05-18 22:54:24 +02:00
rodzic 9d9aa64439
commit c434b2e24e
2 zmienionych plików z 18 dodań i 2 usunięć

Wyświetl plik

@ -990,7 +990,9 @@ void MainWindow::on_action_reloadDevices_triggered()
{
QComboBox *deviceSelectorComboBox = (*it)->m_samplingDeviceControl->getDeviceSelector();
bool sampleSourceSignalsBlocked = deviceSelectorComboBox->blockSignals(true);
m_pluginManager->fillSampleSourceSelector(deviceSelectorComboBox, (*it)->m_deviceSourceEngine->getUID());
uint dspDeviceSourceEngineUID = (*it)->m_deviceSourceEngine->getUID();
m_pluginManager->duplicateLocalSampleSourceDevices(dspDeviceSourceEngineUID);
m_pluginManager->fillSampleSourceSelector(deviceSelectorComboBox, dspDeviceSourceEngineUID);
int newIndex = m_pluginManager->getSampleSourceSelectorIndex(deviceSelectorComboBox, (*it)->m_deviceSourceAPI);
deviceSelectorComboBox->setCurrentIndex(newIndex);
deviceSelectorComboBox->blockSignals(sampleSourceSignalsBlocked);
@ -1000,7 +1002,9 @@ void MainWindow::on_action_reloadDevices_triggered()
{
QComboBox *deviceSelectorComboBox = (*it)->m_samplingDeviceControl->getDeviceSelector();
bool sampleSinkSignalsBlocked = deviceSelectorComboBox->blockSignals(true);
m_pluginManager->fillSampleSinkSelector(deviceSelectorComboBox, (*it)->m_deviceSinkEngine->getUID());
uint dspDeviceSinkEngineUID = (*it)->m_deviceSinkEngine->getUID();
m_pluginManager->duplicateLocalSampleSinkDevices(dspDeviceSinkEngineUID);
m_pluginManager->fillSampleSinkSelector(deviceSelectorComboBox, dspDeviceSinkEngineUID);
int newIndex = m_pluginManager->getSampleSinkSelectorIndex(deviceSelectorComboBox, (*it)->m_deviceSinkAPI);
deviceSelectorComboBox->setCurrentIndex(newIndex);
deviceSelectorComboBox->blockSignals(sampleSinkSignalsBlocked);

Wyświetl plik

@ -127,6 +127,12 @@ void PluginManager::updateSampleSourceDevices()
ssd[j].id,
ssd[j].serial,
ssd[j].sequence));
qDebug("PluginManager::updateSampleSourceDevices: %s %s %s %s %d",
qPrintable(ssd[j].displayedName),
qPrintable(ssd[j].hardwareId),
qPrintable(ssd[j].id),
qPrintable(ssd[j].serial),
ssd[j].sequence);
}
}
}
@ -147,6 +153,12 @@ void PluginManager::updateSampleSinkDevices()
ssd[j].id,
ssd[j].serial,
ssd[j].sequence));
qDebug("PluginManager::updateSampleSinkDevices: %s %s %s %s %d",
qPrintable(ssd[j].displayedName),
qPrintable(ssd[j].hardwareId),
qPrintable(ssd[j].id),
qPrintable(ssd[j].serial),
ssd[j].sequence);
}
}
}