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

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

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

revision 1499 by capela, Tue Nov 20 16:48:04 2007 UTC revision 1523 by capela, Sun Nov 25 11:40:47 2007 UTC
# Line 24  Line 24 
24  #include "qsamplerInstrument.h"  #include "qsamplerInstrument.h"
25  #include "qsamplerUtilities.h"  #include "qsamplerUtilities.h"
26    
27    #include "qsamplerOptions.h"
28  #include "qsamplerMainForm.h"  #include "qsamplerMainForm.h"
29    
30    
# Line 39  qsamplerInstrument::qsamplerInstrument ( Line 40  qsamplerInstrument::qsamplerInstrument (
40          m_iMap          = iMap;          m_iMap          = iMap;
41          m_iBank         = iBank;          m_iBank         = iBank;
42          m_iProg         = iProg;          m_iProg         = iProg;
43          m_iInstrumentNr = 0;;          m_iInstrumentNr = 0;
44          m_fVolume       = 1.0f;          m_fVolume       = 1.0f;
45          m_iLoadMode     = 0;          m_iLoadMode     = 0;
46  }  }
# Line 197  bool qsamplerInstrument::mapInstrument ( Line 198  bool qsamplerInstrument::mapInstrument (
198                          m_sEngineName.toUtf8().constData(),                          m_sEngineName.toUtf8().constData(),
199                          qsamplerUtilities::lscpEscapePath(                          qsamplerUtilities::lscpEscapePath(
200                                  m_sInstrumentFile).toUtf8().constData(),                                  m_sInstrumentFile).toUtf8().constData(),
201                          m_iInstrumentNr,                          m_iInstrumentNr, m_fVolume, load_mode,
                         m_fVolume,  
                         load_mode,  
202                          m_sName.toUtf8().constData()) != LSCP_OK) {                          m_sName.toUtf8().constData()) != LSCP_OK) {
203                  pMainForm->appendMessagesClient("lscp_map_midi_instrument");                  pMainForm->appendMessagesClient("lscp_map_midi_instrument");
204                  return false;                  return false;
# Line 275  bool qsamplerInstrument::getInstrument ( Line 274  bool qsamplerInstrument::getInstrument (
274                  return false;                  return false;
275          }          }
276    
277          m_sName           = qsamplerUtilities::lscpEscapedTextToRaw(pInstrInfo->name);          m_sName = qsamplerUtilities::lscpEscapedTextToRaw(pInstrInfo->name);
278          m_sEngineName     = pInstrInfo->engine_name;          m_sEngineName = pInstrInfo->engine_name;
279          m_sInstrumentName = qsamplerUtilities::lscpEscapedTextToRaw(pInstrInfo->instrument_name);          m_sInstrumentName = qsamplerUtilities::lscpEscapedTextToRaw(
280          m_sInstrumentFile = qsamplerUtilities::lscpEscapedPathToPosix(pInstrInfo->instrument_file);                  pInstrInfo->instrument_name);
281          m_iInstrumentNr   = pInstrInfo->instrument_nr;          m_sInstrumentFile = qsamplerUtilities::lscpEscapedPathToPosix(
282          m_fVolume         = pInstrInfo->volume;                  pInstrInfo->instrument_file);
283            m_iInstrumentNr = pInstrInfo->instrument_nr;
284            m_fVolume = pInstrInfo->volume;
285    
286          switch (pInstrInfo->load_mode) {          switch (pInstrInfo->load_mode) {
287                  case LSCP_LOAD_PERSISTENT:                  case LSCP_LOAD_PERSISTENT:
# Line 359  QString qsamplerInstrument::getMapName ( Line 360  QString qsamplerInstrument::getMapName (
360                  if (::lscp_client_get_errno(pMainForm->client()))                  if (::lscp_client_get_errno(pMainForm->client()))
361                          pMainForm->appendMessagesClient("lscp_get_midi_instrument_name");                          pMainForm->appendMessagesClient("lscp_get_midi_instrument_name");
362          }          }
363          sMapName = QString("%1 - %2").arg(iMidiMap).arg(qsamplerUtilities::lscpEscapedTextToRaw(pszMapName));          sMapName = QString("%1 - %2").arg(iMidiMap)
364                    .arg(qsamplerUtilities::lscpEscapedTextToRaw(pszMapName));
365  #endif  #endif
366    
367          return sMapName;          return sMapName;

Legend:
Removed from v.1499  
changed lines
  Added in v.1523

  ViewVC Help
Powered by ViewVC