138 |
selectMidiDriver(sMidiDriver); |
selectMidiDriver(sMidiDriver); |
139 |
if (!bNew) |
if (!bNew) |
140 |
MidiDeviceComboBox->setCurrentText(midiDevice.deviceName()); |
MidiDeviceComboBox->setCurrentText(midiDevice.deviceName()); |
141 |
|
selectMidiDevice(MidiDeviceComboBox->currentItem()); |
142 |
// MIDI input port... |
// MIDI input port... |
143 |
MidiPortSpinBox->setValue(pChannel->midiPort()); |
MidiPortSpinBox->setValue(pChannel->midiPort()); |
144 |
// MIDI input channel... |
// MIDI input channel... |
147 |
if (iMidiChannel < 0) |
if (iMidiChannel < 0) |
148 |
iMidiChannel = (::lscp_get_channels(m_pChannel->client()) % 16); |
iMidiChannel = (::lscp_get_channels(m_pChannel->client()) % 16); |
149 |
MidiChannelComboBox->setCurrentItem(iMidiChannel); |
MidiChannelComboBox->setCurrentItem(iMidiChannel); |
150 |
|
|
151 |
// Audio output device... |
// Audio output device... |
152 |
qsamplerDevice audioDevice(m_pChannel->client(), |
qsamplerDevice audioDevice(m_pChannel->client(), |
153 |
qsamplerDevice::Audio, m_pChannel->audioDevice()); |
qsamplerDevice::Audio, m_pChannel->audioDevice()); |
163 |
selectAudioDriver(sAudioDriver); |
selectAudioDriver(sAudioDriver); |
164 |
if (!bNew) |
if (!bNew) |
165 |
AudioDeviceComboBox->setCurrentText(audioDevice.deviceName()); |
AudioDeviceComboBox->setCurrentText(audioDevice.deviceName()); |
166 |
|
selectAudioDevice(AudioDeviceComboBox->currentItem()); |
167 |
|
|
168 |
// As convenient, make it ready on stabilizeForm() for |
// As convenient, make it ready on stabilizeForm() for |
169 |
// prompt acceptance, if we got the minimum required... |
// prompt acceptance, if we got the minimum required... |
170 |
if (sEngineName != qsamplerChannel::noEngineName() && |
if (sEngineName != qsamplerChannel::noEngineName() && |
171 |
sInstrumentFile != qsamplerChannel::noInstrumentName()) |
sInstrumentFile != qsamplerChannel::noInstrumentName()) |
172 |
m_iDirtyCount++; |
m_iDirtyCount++; |
173 |
// FIXME: These are better leave diabled... |
// FIXME: These are better leave disabled... |
174 |
MidiPortTextLabel->setEnabled(false); |
MidiPortTextLabel->setEnabled(false); |
175 |
MidiPortSpinBox->setEnabled(false); |
MidiPortSpinBox->setEnabled(false); |
176 |
// Done. |
// Done. |
346 |
} |
} |
347 |
|
|
348 |
|
|
349 |
|
// Select MIDI device options. |
350 |
|
void qsamplerChannelForm::selectMidiDevice ( int iMidiItem ) |
351 |
|
{ |
352 |
|
qsamplerDevice *pDevice = m_midiDevices.at(iMidiItem); |
353 |
|
if (pDevice) { |
354 |
|
qsamplerDeviceParamMap& params = pDevice->params(); |
355 |
|
int iPorts = params["PORTS"].value.toInt(); |
356 |
|
MidiPortTextLabel->setEnabled(iPorts > 0); |
357 |
|
MidiPortSpinBox->setEnabled(iPorts > 0); |
358 |
|
if (iPorts > 0) |
359 |
|
MidiPortSpinBox->setMaxValue(iPorts - 1); |
360 |
|
} |
361 |
|
optionsChanged(); |
362 |
|
} |
363 |
|
|
364 |
|
|
365 |
// Refresh Audio device options. |
// Refresh Audio device options. |
366 |
void qsamplerChannelForm::selectAudioDriver ( const QString& sAudioDriver ) |
void qsamplerChannelForm::selectAudioDriver ( const QString& sAudioDriver ) |
367 |
{ |
{ |
392 |
optionsChanged(); |
optionsChanged(); |
393 |
} |
} |
394 |
|
|
395 |
|
|
396 |
|
// Select Audio device options. |
397 |
|
void qsamplerChannelForm::selectAudioDevice ( int iAudioItem ) |
398 |
|
{ |
399 |
|
qsamplerDevice *pDevice = m_audioDevices.at(iAudioItem); |
400 |
|
if (pDevice) { |
401 |
|
// Is there anything to do here? |
402 |
|
} |
403 |
|
optionsChanged(); |
404 |
|
} |
405 |
|
|
406 |
|
|
407 |
// Dirty up settings. |
// Dirty up settings. |
408 |
void qsamplerChannelForm::optionsChanged (void) |
void qsamplerChannelForm::optionsChanged (void) |