/[svn]/linuxsampler/trunk/src/network/lscpserver.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscpserver.cpp

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

revision 135 by senkov, Sun Jun 20 16:01:50 2004 UTC revision 137 by capela, Sun Jun 20 16:49:47 2004 UTC
# Line 132  String LSCPServer::DestroyAudioOutputDev Line 132  String LSCPServer::DestroyAudioOutputDev
132  /**  /**
133   * Will be called by the parser to load an instrument.   * Will be called by the parser to load an instrument.
134   */   */
135  String LSCPServer::LoadInstrument(String Filename, uint uiInstrument, uint uiSamplerChannel) {  String LSCPServer::LoadInstrument(String Filename, uint uiInstrument, uint uiSamplerChannel, bool bBackground) {
136      dmsg(2,("LSCPServer: LoadInstrument(Filename=%s,Instrument=%d,SamplerChannel=%d)\n", Filename.c_str(), uiInstrument, uiSamplerChannel));      dmsg(2,("LSCPServer: LoadInstrument(Filename=%s,Instrument=%d,SamplerChannel=%d)\n", Filename.c_str(), uiInstrument, uiSamplerChannel));
137      LSCPResultSet result;      LSCPResultSet result;
138      try {      try {
# Line 140  String LSCPServer::LoadInstrument(String Line 140  String LSCPServer::LoadInstrument(String
140          if (!pSamplerChannel) throw LinuxSamplerException("Index out of bounds");          if (!pSamplerChannel) throw LinuxSamplerException("Index out of bounds");
141          Engine* pEngine = pSamplerChannel->GetEngine();          Engine* pEngine = pSamplerChannel->GetEngine();
142          if (!pEngine) throw LinuxSamplerException("No engine loaded on channel");          if (!pEngine) throw LinuxSamplerException("No engine loaded on channel");
143          LSCPLoadInstrument *pLoadInstrument = new LSCPLoadInstrument(pEngine, Filename.c_str(), uiInstrument);          if (bBackground) {
144          pLoadInstrument->StartThread();              LSCPLoadInstrument *pLoadInstrument = new LSCPLoadInstrument(pEngine, Filename.c_str(), uiInstrument);
145                pLoadInstrument->StartThread();
146            }
147            else pEngine->LoadInstrument(Filename.c_str(), uiInstrument);
148      }      }
149      catch (LinuxSamplerException e) {      catch (LinuxSamplerException e) {
150           result.Error(e);           result.Error(e);

Legend:
Removed from v.135  
changed lines
  Added in v.137

  ViewVC Help
Powered by ViewVC