36 |
void qsamplerDeviceForm::init (void) |
void qsamplerDeviceForm::init (void) |
37 |
{ |
{ |
38 |
// Initialize locals. |
// Initialize locals. |
39 |
m_pMainForm = (qsamplerMainForm *) QWidget::parentWidget(); |
m_pMainForm = NULL; |
40 |
m_pClient = NULL; |
m_pClient = NULL; |
41 |
m_iDirtySetup = 0; |
m_iDirtySetup = 0; |
42 |
|
m_iDirtyCount = 0; |
43 |
m_bNewDevice = false; |
m_bNewDevice = false; |
44 |
m_deviceType = qsamplerDevice::None; |
m_deviceType = qsamplerDevice::None; |
45 |
m_pAudioItems = NULL; |
m_pAudioItems = NULL; |
46 |
m_pMidiItems = NULL; |
m_pMidiItems = NULL; |
47 |
|
|
48 |
// This an outsider (from designer), but rather important. |
// This an outsider (from designer), but rather important. |
49 |
QObject::connect(DeviceParamTable, SIGNAL(valueChanged(int,int)), |
QObject::connect(DeviceParamTable, SIGNAL(valueChanged(int,int)), |
50 |
this, SLOT(changeDeviceParam(int,int))); |
this, SLOT(changeDeviceParam(int,int))); |
51 |
QObject::connect(DevicePortParamTable, SIGNAL(valueChanged(int,int)), |
QObject::connect(DevicePortParamTable, SIGNAL(valueChanged(int,int)), |
52 |
this, SLOT(changeDevicePortParam(int,int))); |
this, SLOT(changeDevicePortParam(int,int))); |
53 |
|
|
54 |
|
// Initial contents. |
55 |
|
refreshDevices(); |
56 |
// Try to restore normal window positioning. |
// Try to restore normal window positioning. |
57 |
adjustSize(); |
adjustSize(); |
58 |
} |
} |
83 |
|
|
84 |
if (m_pMainForm) |
if (m_pMainForm) |
85 |
m_pMainForm->stabilizeForm(); |
m_pMainForm->stabilizeForm(); |
86 |
|
|
87 |
|
// Signal special whether we changed the device set. |
88 |
|
if (m_iDirtyCount > 0) { |
89 |
|
m_iDirtyCount = 0; |
90 |
|
emit devicesChanged(); |
91 |
|
} |
92 |
|
} |
93 |
|
|
94 |
|
|
95 |
|
// Application main form settler (life depends on it). |
96 |
|
void qsamplerDeviceForm::setMainForm ( qsamplerMainForm *pMainForm ) |
97 |
|
{ |
98 |
|
m_pMainForm = pMainForm; |
99 |
} |
} |
100 |
|
|
101 |
|
|
114 |
} |
} |
115 |
|
|
116 |
|
|
117 |
// Create a new device from current table view. |
// Set current selected device by type and id. |
118 |
void qsamplerDeviceForm::createDevice (void) |
void qsamplerDeviceForm::setDevice ( |
119 |
|
qsamplerDevice::qsamplerDeviceType deviceType, int iDeviceID ) |
120 |
{ |
{ |
121 |
QListViewItem *pItem = DeviceListView->selectedItem(); |
// Get the device view root item... |
|
if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM) |
|
|
return; |
|
|
|
|
|
const qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device(); |
|
|
|
|
|
// Build the parameter list... |
|
|
const qsamplerDeviceParamMap& params = device.params(); |
|
|
lscp_param_t *pParams = new lscp_param_t [params.count() + 1]; |
|
|
int iParam = 0; |
|
|
qsamplerDeviceParamMap::ConstIterator iter; |
|
|
for (iter = params.begin(); iter != params.end(); ++iter) { |
|
|
pParams[iParam].key = (char *) iter.key().latin1(); |
|
|
pParams[iParam].value = (char *) iter.data().value.latin1(); |
|
|
++iParam; |
|
|
} |
|
|
// Null terminated. |
|
|
pParams[iParam].key = NULL; |
|
|
pParams[iParam].value = NULL; |
|
|
|
|
|
// Now it depends on the device type... |
|
122 |
qsamplerDeviceItem *pRootItem = NULL; |
qsamplerDeviceItem *pRootItem = NULL; |
123 |
int iDeviceID = -1; |
switch (deviceType) { |
|
switch (device.deviceType()) { |
|
124 |
case qsamplerDevice::Audio: |
case qsamplerDevice::Audio: |
125 |
pRootItem = m_pAudioItems; |
pRootItem = m_pAudioItems; |
|
if ((iDeviceID = ::lscp_create_audio_device(m_pClient, |
|
|
device.driverName().latin1(), pParams)) < 0) |
|
|
m_pMainForm->appendMessagesClient("lscp_create_audio_device"); |
|
126 |
break; |
break; |
127 |
case qsamplerDevice::Midi: |
case qsamplerDevice::Midi: |
128 |
pRootItem = m_pMidiItems; |
pRootItem = m_pMidiItems; |
|
if ((iDeviceID = ::lscp_create_midi_device(m_pClient, |
|
|
device.driverName().latin1(), pParams)) < 0) |
|
|
m_pMainForm->appendMessagesClient("lscp_create_midi_device"); |
|
129 |
break; |
break; |
130 |
case qsamplerDevice::None: |
case qsamplerDevice::None: |
131 |
break; |
break; |
132 |
} |
} |
133 |
|
|
134 |
|
// Is the root present? |
135 |
|
if (pRootItem == NULL) |
136 |
|
return; |
137 |
|
|
138 |
|
// For each child, test for identity... |
139 |
|
qsamplerDeviceItem *pDeviceItem = |
140 |
|
(qsamplerDeviceItem *) pRootItem->firstChild(); |
141 |
|
while (pDeviceItem) { |
142 |
|
// If identities match, select as current device item. |
143 |
|
if (pDeviceItem->device().deviceID() == iDeviceID) { |
144 |
|
DeviceListView->setSelected(pDeviceItem, true); |
145 |
|
break; |
146 |
|
} |
147 |
|
pDeviceItem = (qsamplerDeviceItem *) pDeviceItem->nextSibling(); |
148 |
|
} |
149 |
|
} |
150 |
|
|
|
// Free used parameter array. |
|
|
delete pParams; |
|
151 |
|
|
152 |
// We're on to create the new device item. |
|
153 |
if (iDeviceID >= 0) { |
// Create a new device from current table view. |
154 |
|
void qsamplerDeviceForm::createDevice (void) |
155 |
|
{ |
156 |
|
if (m_pMainForm == NULL) |
157 |
|
return; |
158 |
|
|
159 |
|
QListViewItem *pItem = DeviceListView->selectedItem(); |
160 |
|
if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM) |
161 |
|
return; |
162 |
|
|
163 |
|
// About a brand new device instance... |
164 |
|
qsamplerDevice device(((qsamplerDeviceItem *) pItem)->device()); |
165 |
|
if (device.createDevice()) { |
166 |
|
// Now it depends on the device type... |
167 |
|
qsamplerDeviceItem *pRootItem = NULL; |
168 |
|
switch (device.deviceType()) { |
169 |
|
case qsamplerDevice::Audio: |
170 |
|
pRootItem = m_pAudioItems; |
171 |
|
break; |
172 |
|
case qsamplerDevice::Midi: |
173 |
|
pRootItem = m_pMidiItems; |
174 |
|
break; |
175 |
|
case qsamplerDevice::None: |
176 |
|
break; |
177 |
|
} |
178 |
// Append the new device item. |
// Append the new device item. |
179 |
qsamplerDeviceItem *pDeviceItem = new qsamplerDeviceItem(pRootItem, |
qsamplerDeviceItem *pDeviceItem = new qsamplerDeviceItem(pRootItem, |
180 |
m_pClient, device.deviceType(), iDeviceID); |
m_pMainForm, device.deviceType(), device.deviceID()); |
181 |
// Just make it the new selection... |
// Just make it the new selection... |
182 |
DeviceListView->setSelected(pDeviceItem, true); |
DeviceListView->setSelected(pDeviceItem, true); |
|
// Done. |
|
|
m_pMainForm->appendMessages(pDeviceItem->device().deviceName() + ' ' |
|
|
+ tr("created.")); |
|
183 |
// Main session should be marked dirty. |
// Main session should be marked dirty. |
184 |
m_pMainForm->sessionDirty(); |
m_pMainForm->sessionDirty(); |
185 |
|
m_iDirtyCount++; |
186 |
} |
} |
187 |
} |
} |
188 |
|
|
190 |
// Delete current device in table view. |
// Delete current device in table view. |
191 |
void qsamplerDeviceForm::deleteDevice (void) |
void qsamplerDeviceForm::deleteDevice (void) |
192 |
{ |
{ |
193 |
|
if (m_pMainForm == NULL) |
194 |
|
return; |
195 |
|
|
196 |
QListViewItem *pItem = DeviceListView->selectedItem(); |
QListViewItem *pItem = DeviceListView->selectedItem(); |
197 |
if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM) |
if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM) |
198 |
return; |
return; |
199 |
|
|
200 |
const qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device(); |
qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device(); |
201 |
|
|
202 |
// Prompt user if this is for real... |
// Prompt user if this is for real... |
203 |
qsamplerOptions *pOptions = m_pMainForm->options(); |
qsamplerOptions *pOptions = m_pMainForm->options(); |
204 |
if (pOptions && pOptions->bConfirmRemove) { |
if (pOptions && pOptions->bConfirmRemove) { |
205 |
if (QMessageBox::warning(this, tr("Warning"), |
if (QMessageBox::warning(this, tr("Warning"), |
206 |
tr("Delete %1 device:\n\n" |
tr("Delete device:\n\n" |
207 |
"%2\n\n" |
"%1\n\n" |
208 |
"Are you sure?") |
"Are you sure?") |
|
.arg(device.deviceTypeName()) |
|
209 |
.arg(device.deviceName()), |
.arg(device.deviceName()), |
210 |
tr("OK"), tr("Cancel")) > 0) |
tr("OK"), tr("Cancel")) > 0) |
211 |
return; |
return; |
212 |
} |
} |
213 |
|
|
214 |
// Now it depends on the device type... |
// Go and destroy... |
215 |
lscp_status_t ret = LSCP_FAILED; |
if (device.deleteDevice()) { |
216 |
switch (device.deviceType()) { |
// Remove it from the device view... |
|
case qsamplerDevice::Audio: |
|
|
if ((ret = ::lscp_destroy_audio_device(m_pClient, |
|
|
device.deviceID())) != LSCP_OK) |
|
|
m_pMainForm->appendMessagesClient("lscp_destroy_audio_device"); |
|
|
break; |
|
|
case qsamplerDevice::Midi: |
|
|
if ((ret = ::lscp_destroy_midi_device(m_pClient, |
|
|
device.deviceID())) != LSCP_OK) |
|
|
m_pMainForm->appendMessagesClient("lscp_destroy_midi_device"); |
|
|
break; |
|
|
case qsamplerDevice::None: |
|
|
break; |
|
|
} |
|
|
|
|
|
// Show result. |
|
|
if (ret == LSCP_OK) { |
|
|
// Show log message before loosing it. |
|
|
m_pMainForm->appendMessages(device.deviceName() + ' ' |
|
|
+ tr("deleted.")); |
|
|
// Done. |
|
217 |
delete pItem; |
delete pItem; |
218 |
// Main session should be marked dirty. |
// Main session should be marked dirty. |
219 |
m_pMainForm->sessionDirty(); |
m_pMainForm->sessionDirty(); |
220 |
|
m_iDirtyCount++; |
221 |
} |
} |
222 |
} |
} |
223 |
|
|
225 |
// Refresh all device list and views. |
// Refresh all device list and views. |
226 |
void qsamplerDeviceForm::refreshDevices (void) |
void qsamplerDeviceForm::refreshDevices (void) |
227 |
{ |
{ |
228 |
|
if (m_pMainForm == NULL) |
229 |
|
return; |
230 |
|
|
231 |
// Avoid nested changes. |
// Avoid nested changes. |
232 |
m_iDirtySetup++; |
m_iDirtySetup++; |
233 |
|
|
240 |
if (m_pClient) { |
if (m_pClient) { |
241 |
int *piDeviceIDs; |
int *piDeviceIDs; |
242 |
// Grab and pop Audio devices... |
// Grab and pop Audio devices... |
243 |
m_pAudioItems = new qsamplerDeviceItem(DeviceListView, m_pClient, |
m_pAudioItems = new qsamplerDeviceItem(DeviceListView, |
244 |
qsamplerDevice::Audio); |
m_pMainForm, qsamplerDevice::Audio); |
245 |
if (m_pAudioItems) { |
if (m_pAudioItems) { |
|
m_pAudioItems->setText(0, tr("Audio")); |
|
246 |
piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Audio); |
piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Audio); |
247 |
for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) { |
for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) { |
248 |
new qsamplerDeviceItem(m_pAudioItems, m_pClient, |
new qsamplerDeviceItem(m_pAudioItems, m_pMainForm, |
249 |
qsamplerDevice::Audio, piDeviceIDs[i]); |
qsamplerDevice::Audio, piDeviceIDs[i]); |
250 |
} |
} |
251 |
m_pAudioItems->setOpen(true); |
m_pAudioItems->setOpen(true); |
252 |
} |
} |
253 |
// Grab and pop MIDI devices... |
// Grab and pop MIDI devices... |
254 |
m_pMidiItems = new qsamplerDeviceItem(DeviceListView, m_pClient, |
m_pMidiItems = new qsamplerDeviceItem(DeviceListView, |
255 |
qsamplerDevice::Midi); |
m_pMainForm, qsamplerDevice::Midi); |
256 |
if (m_pMidiItems) { |
if (m_pMidiItems) { |
|
m_pMidiItems->setText(0, tr("MIDI")); |
|
257 |
piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Midi); |
piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Midi); |
258 |
for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) { |
for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) { |
259 |
new qsamplerDeviceItem(m_pMidiItems, m_pClient, |
new qsamplerDeviceItem(m_pMidiItems, m_pMainForm, |
260 |
qsamplerDevice::Midi, piDeviceIDs[i]); |
qsamplerDevice::Midi, piDeviceIDs[i]); |
261 |
} |
} |
262 |
m_pMidiItems->setOpen(true); |
m_pMidiItems->setOpen(true); |
290 |
// Driver change is only valid for scratch devices... |
// Driver change is only valid for scratch devices... |
291 |
if (m_bNewDevice) { |
if (m_bNewDevice) { |
292 |
m_iDirtySetup++; |
m_iDirtySetup++; |
293 |
device.setDriver(m_pClient, sDriverName); |
device.setDriver(sDriverName); |
294 |
DeviceParamTable->refresh(device.params(), m_bNewDevice); |
DeviceParamTable->refresh(device.params(), m_bNewDevice); |
295 |
m_iDirtySetup--; |
m_iDirtySetup--; |
296 |
// Done. |
// Done. |
314 |
m_deviceType = qsamplerDevice::None; |
m_deviceType = qsamplerDevice::None; |
315 |
DeviceNameTextLabel->setText(QString::null); |
DeviceNameTextLabel->setText(QString::null); |
316 |
DeviceParamTable->setNumRows(0); |
DeviceParamTable->setNumRows(0); |
317 |
|
DevicePortComboBox->clear(); |
318 |
|
DevicePortParamTable->setNumRows(0); |
319 |
DevicePortComboBox->setEnabled(false); |
DevicePortComboBox->setEnabled(false); |
320 |
DevicePortParamTable->setEnabled(false); |
DevicePortParamTable->setEnabled(false); |
321 |
stabilizeForm(); |
stabilizeForm(); |
329 |
m_bNewDevice = (device.deviceID() < 0); |
m_bNewDevice = (device.deviceID() < 0); |
330 |
|
|
331 |
// Fill the device/driver heading... |
// Fill the device/driver heading... |
332 |
QString sPrefix; |
DeviceNameTextLabel->setText(device.deviceName()); |
|
if (!m_bNewDevice) |
|
|
sPrefix += device.deviceTypeName() + ' '; |
|
|
DeviceNameTextLabel->setText(sPrefix + device.deviceName()); |
|
333 |
// The driver combobox is only rebuilt if device type has changed... |
// The driver combobox is only rebuilt if device type has changed... |
334 |
if (device.deviceType() != m_deviceType) { |
if (device.deviceType() != m_deviceType) { |
335 |
DriverNameComboBox->clear(); |
DriverNameComboBox->clear(); |
339 |
} |
} |
340 |
// Do we need a driver name? |
// Do we need a driver name? |
341 |
if (m_bNewDevice || device.driverName().isEmpty()) |
if (m_bNewDevice || device.driverName().isEmpty()) |
342 |
device.setDriver(m_pClient, DriverNameComboBox->currentText()); |
device.setDriver(DriverNameComboBox->currentText()); |
343 |
const QString& sDriverName = device.driverName(); |
const QString& sDriverName = device.driverName(); |
344 |
if (DriverNameComboBox->listBox()->findItem(sDriverName, Qt::ExactMatch) == NULL) |
if (DriverNameComboBox->listBox()->findItem(sDriverName, Qt::ExactMatch) == NULL) |
345 |
DriverNameComboBox->insertItem(sDriverName); |
DriverNameComboBox->insertItem(sDriverName); |
369 |
qsamplerDevicePortList& ports = device.ports(); |
qsamplerDevicePortList& ports = device.ports(); |
370 |
qsamplerDevicePort *pPort; |
qsamplerDevicePort *pPort; |
371 |
for (pPort = ports.first(); pPort; pPort = ports.next()) { |
for (pPort = ports.first(); pPort; pPort = ports.next()) { |
372 |
DevicePortComboBox->insertItem(pixmap, |
DevicePortComboBox->insertItem(pixmap, device.deviceTypeName() |
373 |
device.deviceTypeName() + ' ' + pPort->portName()); |
+ ' ' + device.driverName() |
374 |
|
+ ' ' + pPort->portName()); |
375 |
} |
} |
376 |
bool bEnabled = (ports.count() > 0); |
bool bEnabled = (ports.count() > 0); |
377 |
DevicePortComboBox->setEnabled(bEnabled); |
DevicePortComboBox->setEnabled(bEnabled); |
414 |
// Device parameter value change slot. |
// Device parameter value change slot. |
415 |
void qsamplerDeviceForm::changeDeviceParam ( int iRow, int iCol ) |
void qsamplerDeviceForm::changeDeviceParam ( int iRow, int iCol ) |
416 |
{ |
{ |
417 |
|
if (m_pMainForm == NULL) |
418 |
|
return; |
419 |
if (m_iDirtySetup > 0) |
if (m_iDirtySetup > 0) |
420 |
return; |
return; |
421 |
if (iRow < 0 || iCol < 0) |
if (iRow < 0 || iCol < 0) |
431 |
|
|
432 |
qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device(); |
qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device(); |
433 |
|
|
|
m_iDirtySetup++; |
|
434 |
// Table 1st column has the parameter name; |
// Table 1st column has the parameter name; |
435 |
const QString sParam = DeviceParamTable->text(iRow, 0); |
const QString sParam = DeviceParamTable->text(iRow, 0); |
436 |
const QString sValue = DeviceParamTable->text(iRow, iCol); |
const QString sValue = DeviceParamTable->text(iRow, iCol); |
|
|
|
437 |
// Set the local device parameter value. |
// Set the local device parameter value. |
438 |
device.setParam(sParam, sValue); |
if (device.setParam(sParam, sValue)) { |
439 |
|
selectDevice(); |
440 |
// Set proper device parameter, on existing device ... |
} else { |
441 |
if (device.deviceID() >= 0) { |
stabilizeForm(); |
|
// Prepare parameter struct. |
|
|
lscp_param_t param; |
|
|
param.key = (char *) sParam.latin1(); |
|
|
param.value = (char *) sValue.latin1(); |
|
|
// Now it depends on the device type... |
|
|
bool bRefresh = false; |
|
|
lscp_status_t ret = LSCP_FAILED; |
|
|
switch (device.deviceType()) { |
|
|
case qsamplerDevice::Audio: |
|
|
bRefresh = (sParam == "CHANNELS"); |
|
|
if ((ret = ::lscp_set_audio_device_param(m_pClient, |
|
|
device.deviceID(), ¶m)) != LSCP_OK) |
|
|
m_pMainForm->appendMessagesClient("lscp_set_audio_device_param"); |
|
|
break; |
|
|
case qsamplerDevice::Midi: |
|
|
bRefresh = (sParam == "PORTS"); |
|
|
if ((ret = ::lscp_set_midi_device_param(m_pClient, |
|
|
device.deviceID(), ¶m)) != LSCP_OK) |
|
|
m_pMainForm->appendMessagesClient("lscp_set_midi_device_param"); |
|
|
break; |
|
|
case qsamplerDevice::None: |
|
|
break; |
|
|
} |
|
|
// Show result. |
|
|
if (ret == LSCP_OK) { |
|
|
m_pMainForm->appendMessages(device.deviceName() + ' ' |
|
|
+ QString("%1: %2.").arg(sParam).arg(sValue)); |
|
|
// Special care for specific parameter changes... |
|
|
if (bRefresh) |
|
|
device.refresh(m_pClient); |
|
|
} |
|
442 |
} |
} |
|
|
|
|
// Done. |
|
|
m_iDirtySetup--; |
|
|
stabilizeForm(); |
|
443 |
// Main session should be dirtier... |
// Main session should be dirtier... |
444 |
m_pMainForm->sessionDirty(); |
m_pMainForm->sessionDirty(); |
445 |
} |
} |
448 |
// Device port/channel parameter value change slot. |
// Device port/channel parameter value change slot. |
449 |
void qsamplerDeviceForm::changeDevicePortParam ( int iRow, int iCol ) |
void qsamplerDeviceForm::changeDevicePortParam ( int iRow, int iCol ) |
450 |
{ |
{ |
451 |
|
if (m_pMainForm == NULL) |
452 |
|
return; |
453 |
if (m_iDirtySetup > 0) |
if (m_iDirtySetup > 0) |
454 |
return; |
return; |
455 |
if (iRow < 0 || iCol < 0) |
if (iRow < 0 || iCol < 0) |
470 |
if (pPort == NULL) |
if (pPort == NULL) |
471 |
return; |
return; |
472 |
|
|
|
m_iDirtySetup++; |
|
473 |
// Table 1st column has the parameter name; |
// Table 1st column has the parameter name; |
474 |
const QString sParam = DevicePortParamTable->text(iRow, 0); |
const QString sParam = DevicePortParamTable->text(iRow, 0); |
475 |
const QString sValue = DevicePortParamTable->text(iRow, iCol); |
const QString sValue = DevicePortParamTable->text(iRow, iCol); |
|
|
|
476 |
// Set the local device port/channel parameter value. |
// Set the local device port/channel parameter value. |
477 |
pPort->setParam(sParam, sValue); |
pPort->setParam(sParam, sValue); |
|
|
|
|
// Set proper device port/channel parameter, if any... |
|
|
if (device.deviceID() >= 0 && pPort->portID() >= 0) { |
|
|
// Prepare parameter struct. |
|
|
lscp_param_t param; |
|
|
param.key = (char *) sParam.latin1(); |
|
|
param.value = (char *) sValue.latin1(); |
|
|
// Now it depends on the device type... |
|
|
lscp_status_t ret = LSCP_FAILED; |
|
|
switch (device.deviceType()) { |
|
|
case qsamplerDevice::Audio: |
|
|
if ((ret = ::lscp_set_audio_channel_param(m_pClient, |
|
|
device.deviceID(), pPort->portID(), ¶m)) != LSCP_OK) |
|
|
m_pMainForm->appendMessagesClient("lscp_set_audio_channel_param"); |
|
|
break; |
|
|
case qsamplerDevice::Midi: |
|
|
if ((ret = ::lscp_set_midi_port_param(m_pClient, |
|
|
device.deviceID(), pPort->portID(), ¶m)) != LSCP_OK) |
|
|
m_pMainForm->appendMessagesClient("lscp_set_midi_port_param"); |
|
|
break; |
|
|
case qsamplerDevice::None: |
|
|
break; |
|
|
} |
|
|
// Show result. |
|
|
if (ret == LSCP_OK) { |
|
|
m_pMainForm->appendMessages(device.deviceName() + ' ' |
|
|
+ pPort->portName() + ' ' |
|
|
+ QString("%1: %2.").arg(sParam).arg(sValue)); |
|
|
} |
|
|
} |
|
|
|
|
478 |
// Done. |
// Done. |
|
m_iDirtySetup--; |
|
479 |
stabilizeForm(); |
stabilizeForm(); |
480 |
// Main session should be dirtier... |
// Main session should be dirtier... |
481 |
m_pMainForm->sessionDirty(); |
m_pMainForm->sessionDirty(); |