19 |
|
|
20 |
*****************************************************************************/ |
*****************************************************************************/ |
21 |
|
|
22 |
|
#include "qsamplerUtilities.h" |
23 |
#include "qsamplerAbout.h" |
#include "qsamplerAbout.h" |
24 |
#include "qsamplerChannel.h" |
#include "qsamplerChannel.h" |
25 |
|
|
203 |
if (m_iInstrumentStatus == 100 && m_sInstrumentFile == sInstrumentFile && m_iInstrumentNr == iInstrumentNr) |
if (m_iInstrumentStatus == 100 && m_sInstrumentFile == sInstrumentFile && m_iInstrumentNr == iInstrumentNr) |
204 |
return true; |
return true; |
205 |
|
|
206 |
if (::lscp_load_instrument_non_modal(pMainForm->client(), sInstrumentFile.latin1(), iInstrumentNr, m_iChannelID) != LSCP_OK) { |
if ( |
207 |
|
::lscp_load_instrument_non_modal( |
208 |
|
pMainForm->client(), |
209 |
|
lscpEscapePath(sInstrumentFile).latin1(), |
210 |
|
iInstrumentNr, m_iChannelID |
211 |
|
) != LSCP_OK |
212 |
|
) { |
213 |
appendMessagesClient("lscp_load_instrument"); |
appendMessagesClient("lscp_load_instrument"); |
214 |
return false; |
return false; |
215 |
} |
} |
684 |
bool qsamplerChannel::editChannel (void) |
bool qsamplerChannel::editChannel (void) |
685 |
{ |
{ |
686 |
#ifdef CONFIG_EDIT_INSTRUMENT |
#ifdef CONFIG_EDIT_INSTRUMENT |
687 |
|
|
688 |
qsamplerMainForm *pMainForm = qsamplerMainForm::getInstance(); |
qsamplerMainForm *pMainForm = qsamplerMainForm::getInstance(); |
689 |
if (pMainForm == NULL) |
if (pMainForm == NULL) |
690 |
return false; |
return false; |
693 |
|
|
694 |
if (::lscp_edit_instrument(pMainForm->client(), m_iChannelID) != LSCP_OK) { |
if (::lscp_edit_instrument(pMainForm->client(), m_iChannelID) != LSCP_OK) { |
695 |
appendMessagesClient("lscp_edit_instrument"); |
appendMessagesClient("lscp_edit_instrument"); |
696 |
appendMessagesError( |
appendMessagesError(QObject::tr( |
697 |
"Could not launch an appropriate instrument editor for the\n" |
"Could not launch an appropriate instrument editor " |
698 |
"given instrument! Make sure you have an appropriate\n" |
"for the given instrument!\n" |
699 |
"instrument editor like 'gigedit' installed and that it placed\n" |
"Make sure you have an appropriate " |
700 |
"its mandatory DLL file into the sampler's plugin directory." |
"instrument editor like 'gigedit' installed\n" |
701 |
|
"and that it placed its mandatory DLL file " |
702 |
|
"into the sampler's plugin directory.") |
703 |
); |
); |
704 |
return false; |
return false; |
705 |
} |
} |
707 |
appendMessages(QObject::tr("edit instrument.")); |
appendMessages(QObject::tr("edit instrument.")); |
708 |
|
|
709 |
return true; |
return true; |
710 |
|
|
711 |
#else |
#else |
712 |
appendMessagesError( |
|
713 |
"Sorry, QSampler was compiled for a version of liblscp which lacks\n" |
appendMessagesError(QObject::tr( |
714 |
"this feature. You may want to update liblscp and recompile\n" |
"Sorry, QSampler was compiled for a version of liblscp " |
715 |
"QSampler afterwards." |
"which lacks this feature.\n" |
716 |
|
"You may want to update liblscp and recompile QSampler afterwards.") |
717 |
); |
); |
718 |
|
|
719 |
return false; |
return false; |
720 |
|
|
721 |
#endif |
#endif |
722 |
} |
} |
723 |
|
|