190 |
} |
} |
191 |
|
|
192 |
if (::lscp_map_midi_instrument(pMainForm->client(), &instr, |
if (::lscp_map_midi_instrument(pMainForm->client(), &instr, |
193 |
m_sEngineName.latin1(), |
m_sEngineName.latin1(), |
194 |
m_sInstrumentFile.latin1(), |
m_sInstrumentFile.latin1(), |
195 |
m_iInstrumentNr, |
m_iInstrumentNr, |
196 |
m_fVolume, |
m_fVolume, |
197 |
load_mode, |
load_mode, |
198 |
m_sName.latin1()) != LSCP_OK) { |
m_sName.latin1()) != LSCP_OK) { |
199 |
pMainForm->appendMessagesClient("lscp_map_midi_instrument"); |
pMainForm->appendMessagesClient("lscp_map_midi_instrument"); |
200 |
return false; |
return false; |
201 |
} |
} |
320 |
|
|
321 |
#ifdef CONFIG_MIDI_INSTRUMENT |
#ifdef CONFIG_MIDI_INSTRUMENT |
322 |
int *piMaps = ::lscp_list_midi_instrument_maps(pMainForm->client()); |
int *piMaps = ::lscp_list_midi_instrument_maps(pMainForm->client()); |
323 |
for (int iMap = 0; piMaps && piMaps[iMap] >= 0; iMap++) { |
if (piMaps == NULL) { |
324 |
const QString& sMapName = getMapName(piMaps[iMap]); |
if (::lscp_client_get_errno(pMainForm->client())) |
325 |
if (!sMapName.isEmpty()) |
pMainForm->appendMessagesClient("lscp_list_midi_instruments"); |
326 |
maps.append(sMapName); |
} else { |
327 |
|
for (int iMap = 0; piMaps[iMap] >= 0; iMap++) { |
328 |
|
const QString& sMapName = getMapName(piMaps[iMap]); |
329 |
|
if (!sMapName.isEmpty()) |
330 |
|
maps.append(sMapName); |
331 |
|
} |
332 |
} |
} |
333 |
#endif |
#endif |
334 |
|
|
349 |
#ifdef CONFIG_MIDI_INSTRUMENT |
#ifdef CONFIG_MIDI_INSTRUMENT |
350 |
const char *pszMapName |
const char *pszMapName |
351 |
= ::lscp_get_midi_instrument_map_name(pMainForm->client(), iMidiMap); |
= ::lscp_get_midi_instrument_map_name(pMainForm->client(), iMidiMap); |
352 |
if (pszMapName == NULL) |
if (pszMapName == NULL) { |
353 |
pszMapName = " -"; |
pszMapName = " -"; |
354 |
|
if (::lscp_client_get_errno(pMainForm->client())) |
355 |
|
pMainForm->appendMessagesClient("lscp_get_midi_instrument_name"); |
356 |
|
} |
357 |
sMapName = QString("%1 - %2").arg(iMidiMap).arg(pszMapName); |
sMapName = QString("%1 - %2").arg(iMidiMap).arg(pszMapName); |
358 |
#endif |
#endif |
359 |
|
|