183 |
|
|
184 |
// As convenient, make it ready on stabilizeForm() for |
// As convenient, make it ready on stabilizeForm() for |
185 |
// prompt acceptance, if we got the minimum required... |
// prompt acceptance, if we got the minimum required... |
186 |
if (sEngineName != qsamplerChannel::noEngineName() && |
/* if (sEngineName != qsamplerChannel::noEngineName() && |
187 |
sInstrumentFile != qsamplerChannel::noInstrumentName()) |
sInstrumentFile != qsamplerChannel::noInstrumentName()) |
188 |
m_iDirtyCount++; |
m_iDirtyCount++; */ |
189 |
// Done. |
// Done. |
190 |
m_iDirtySetup--; |
m_iDirtySetup--; |
191 |
stabilizeForm(); |
stabilizeForm(); |
369 |
const QString sDriverName = sMidiDriver.upper(); |
const QString sDriverName = sMidiDriver.upper(); |
370 |
|
|
371 |
// Save current device id. |
// Save current device id. |
372 |
int iDeviceID = -1; |
int iDeviceID = 0; |
373 |
qsamplerDevice *pDevice = m_midiDevices.at(MidiDeviceComboBox->currentItem()); |
qsamplerDevice *pDevice = m_midiDevices.at(MidiDeviceComboBox->currentItem()); |
374 |
if (pDevice) |
if (pDevice) |
375 |
iDeviceID = pDevice->deviceID(); |
iDeviceID = pDevice->deviceID(); |
395 |
|
|
396 |
// Do proper enabling... |
// Do proper enabling... |
397 |
bool bEnabled = !m_midiDevices.isEmpty(); |
bool bEnabled = !m_midiDevices.isEmpty(); |
398 |
if (!bEnabled) { |
if (bEnabled) { |
|
MidiDeviceComboBox->insertItem( |
|
|
tr("(New MIDI %1 device)").arg(sMidiDriver)); |
|
|
} else if (iDeviceID >= 0) { |
|
399 |
// Select the previous current device... |
// Select the previous current device... |
400 |
int iMidiItem = 0; |
int iMidiItem = 0; |
401 |
for (pDevice = m_midiDevices.first(); |
for (pDevice = m_midiDevices.first(); |
408 |
} |
} |
409 |
iMidiItem++; |
iMidiItem++; |
410 |
} |
} |
411 |
|
} else { |
412 |
|
MidiDeviceComboBox->insertItem( |
413 |
|
tr("(New MIDI %1 device)").arg(sMidiDriver)); |
414 |
} |
} |
415 |
MidiDeviceTextLabel->setEnabled(bEnabled); |
MidiDeviceTextLabel->setEnabled(bEnabled); |
416 |
MidiDeviceComboBox->setEnabled(bEnabled); |
MidiDeviceComboBox->setEnabled(bEnabled); |
468 |
const QString sDriverName = sAudioDriver.upper(); |
const QString sDriverName = sAudioDriver.upper(); |
469 |
|
|
470 |
// Save current device id. |
// Save current device id. |
471 |
int iDeviceID = -1; |
int iDeviceID = 0; |
472 |
qsamplerDevice *pDevice = m_audioDevices.at(AudioDeviceComboBox->currentItem()); |
qsamplerDevice *pDevice = m_audioDevices.at(AudioDeviceComboBox->currentItem()); |
473 |
if (pDevice) |
if (pDevice) |
474 |
iDeviceID = pDevice->deviceID(); |
iDeviceID = pDevice->deviceID(); |
494 |
|
|
495 |
// Do proper enabling... |
// Do proper enabling... |
496 |
bool bEnabled = !m_audioDevices.isEmpty(); |
bool bEnabled = !m_audioDevices.isEmpty(); |
497 |
if (!bEnabled) { |
if (bEnabled) { |
|
AudioDeviceComboBox->insertItem( |
|
|
tr("(New Audio %1 device)").arg(sAudioDriver)); |
|
|
} else if (iDeviceID >= 0) { |
|
498 |
// Select the previous current device... |
// Select the previous current device... |
499 |
int iAudioItem = 0; |
int iAudioItem = 0; |
500 |
for (pDevice = m_audioDevices.first(); |
for (pDevice = m_audioDevices.first(); |
507 |
} |
} |
508 |
iAudioItem++; |
iAudioItem++; |
509 |
} |
} |
510 |
|
} else { |
511 |
|
AudioDeviceComboBox->insertItem( |
512 |
|
tr("(New Audio %1 device)").arg(sAudioDriver)); |
513 |
|
AudioRoutingTable->setNumRows(0); |
514 |
} |
} |
515 |
AudioDeviceTextLabel->setEnabled(bEnabled); |
AudioDeviceTextLabel->setEnabled(bEnabled); |
516 |
AudioDeviceComboBox->setEnabled(bEnabled); |
AudioDeviceComboBox->setEnabled(bEnabled); |
517 |
AudioRoutingTable->setEnabled(bEnabled); |
AudioRoutingTable->setEnabled(bEnabled); |
|
if (!bEnabled) |
|
|
AudioRoutingTable->setNumRows(0); |
|
518 |
} |
} |
519 |
|
|
520 |
|
|
573 |
QTableItem *pItem = AudioRoutingTable->item(iRow, iCol); |
QTableItem *pItem = AudioRoutingTable->item(iRow, iCol); |
574 |
if (pItem == NULL) |
if (pItem == NULL) |
575 |
return; |
return; |
576 |
if (pItem->rtti() == 1) { // 1 == QComboTableItem |
qsamplerChannelRoutingComboBox *pComboItem = |
577 |
QComboTableItem *pComboItem = (QComboTableItem *) pItem; |
static_cast<qsamplerChannelRoutingComboBox*> (pItem); |
578 |
// FIXME: Its not garanteed that we must have |
// FIXME: Its not garanteed that we must have |
579 |
// iAudioOut == iRow on all times forth! |
// iAudioOut == iRow on all times forth! |
580 |
m_audioRouting[iRow] = pComboItem->currentItem(); |
m_audioRouting[iRow] = pComboItem->currentItem(); |
581 |
// And let's get dirty... |
|
582 |
m_iDirtyCount++; |
// And let's get dirty... |
583 |
} |
optionsChanged(); |
584 |
} |
} |
585 |
|
|
586 |
|
|