/[svn]/qsampler/trunk/src/qsamplerChannel.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerChannel.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1366 by schoenebeck, Mon Oct 1 18:26:06 2007 UTC revision 1414 by capela, Fri Oct 12 22:50:47 2007 UTC
# Line 19  Line 19 
19    
20  *****************************************************************************/  *****************************************************************************/
21    
22    #include "qsamplerUtilities.h"
23  #include "qsamplerAbout.h"  #include "qsamplerAbout.h"
24  #include "qsamplerChannel.h"  #include "qsamplerChannel.h"
25    
# Line 202  bool qsamplerChannel::loadInstrument ( c Line 203  bool qsamplerChannel::loadInstrument ( c
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                            qsamplerUtilities::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          }          }
# Line 580  bool qsamplerChannel::updateChannelInfo Line 587  bool qsamplerChannel::updateChannelInfo
587    
588  #ifdef CONFIG_INSTRUMENT_NAME  #ifdef CONFIG_INSTRUMENT_NAME
589          // We got all actual instrument datum...          // We got all actual instrument datum...
590          m_sInstrumentFile = pChannelInfo->instrument_file;          m_sInstrumentFile =
591                    qsamplerUtilities::lscpEscapedPathToPosix(pChannelInfo->instrument_file);
592          m_iInstrumentNr   = pChannelInfo->instrument_nr;          m_iInstrumentNr   = pChannelInfo->instrument_nr;
593          m_sInstrumentName = pChannelInfo->instrument_name;          m_sInstrumentName =
594                    qsamplerUtilities::lscpEscapedTextToRaw(pChannelInfo->instrument_name);
595  #else  #else
596          // First, check if intrument name has changed,          // First, check if intrument name has changed,
597          // taking care that instrument name lookup might be expensive,          // taking care that instrument name lookup might be expensive,
# Line 677  bool qsamplerChannel::channelReset (void Line 686  bool qsamplerChannel::channelReset (void
686  bool qsamplerChannel::editChannel (void)  bool qsamplerChannel::editChannel (void)
687  {  {
688  #ifdef CONFIG_EDIT_INSTRUMENT  #ifdef CONFIG_EDIT_INSTRUMENT
689    
690          qsamplerMainForm *pMainForm = qsamplerMainForm::getInstance();          qsamplerMainForm *pMainForm = qsamplerMainForm::getInstance();
691          if (pMainForm == NULL)          if (pMainForm == NULL)
692                  return false;                  return false;
693          if (pMainForm->client() == NULL || m_iChannelID < 0)          if (pMainForm->client() == NULL || m_iChannelID < 0)
694                  return false;                  return false;
695    
696          if (::lscp_edit_instrument(pMainForm->client(), m_iChannelID) != LSCP_OK) {          if (::lscp_edit_channel_instrument(pMainForm->client(), m_iChannelID)
697                  appendMessagesClient("lscp_edit_instrument");                  != LSCP_OK) {
698                  appendMessagesError(                  appendMessagesClient("lscp_edit_channel_instrument");
699                          "Could not launch an appropriate instrument editor for the\n"                  appendMessagesError(QObject::tr(
700                          "given instrument! Make sure you have an appropriate\n"                          "Could not launch an appropriate instrument editor "
701                          "instrument editor like 'gigedit' installed and that it placed\n"                          "for the given instrument!\n"
702                          "its mandatory DLL file into the sampler's plugin directory."                          "Make sure you have an appropriate "
703                            "instrument editor like 'gigedit' installed\n"
704                            "and that it placed its mandatory DLL file "
705                            "into the sampler's plugin directory.")
706                  );                  );
707                  return false;                  return false;
708          }          }
# Line 697  bool qsamplerChannel::editChannel (void) Line 710  bool qsamplerChannel::editChannel (void)
710          appendMessages(QObject::tr("edit instrument."));          appendMessages(QObject::tr("edit instrument."));
711    
712          return true;          return true;
713    
714  #else  #else
715          appendMessagesError(  
716                  "Sorry, QSampler was compiled for a version of liblscp which lacks\n"          appendMessagesError(QObject::tr(
717                  "this feature. You may want to update liblscp and recompile\n"                  "Sorry, QSampler was compiled for a version of liblscp "
718                  "QSampler afterwards."                  "which lacks this feature.\n"
719                    "You may want to update liblscp and recompile QSampler afterwards.")
720          );          );
721    
722          return false;          return false;
723    
724  #endif  #endif
725  }  }
726    

Legend:
Removed from v.1366  
changed lines
  Added in v.1414

  ViewVC Help
Powered by ViewVC