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

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

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

revision 410 by schoenebeck, Sat Feb 19 02:40:24 2005 UTC revision 411 by schoenebeck, Sat Feb 26 02:01:14 2005 UTC
# Line 36  LSCPInstrumentLoader::~LSCPInstrumentLoa Line 36  LSCPInstrumentLoader::~LSCPInstrumentLoa
36   *   *
37   * @param Filename - file name of the instrument   * @param Filename - file name of the instrument
38   * @param uiInstrumentIndex - index of the instrument within the file   * @param uiInstrumentIndex - index of the instrument within the file
39   * @param pEngine - engine on which the instrument should be loaded   * @param pEngineChannel - engine channel on which the instrument should be loaded
40   */   */
41  void LSCPInstrumentLoader::StartNewLoad(String Filename, uint uiInstrumentIndex, Engine* pEngine) {  void LSCPInstrumentLoader::StartNewLoad(String Filename, uint uiInstrumentIndex, EngineChannel* pEngineChannel) {
42      // already tell the engine which instrument to load      // already tell the engine which instrument to load
43      pEngine->PrepareLoadInstrument(Filename.c_str(), uiInstrumentIndex);      pEngineChannel->PrepareLoadInstrument(Filename.c_str(), uiInstrumentIndex);
44    
45      command_t cmd;      command_t cmd;
46      cmd.pEngine = pEngine;      cmd.pEngineChannel = pEngineChannel;
47      pQueue->push(&cmd);      pQueue->push(&cmd);
48      StartThread(); // ensure thread is running      StartThread(); // ensure thread is running
49      conditionJobsLeft.Set(true); // wake up thread      conditionJobsLeft.Set(true); // wake up thread
# Line 56  int LSCPInstrumentLoader::Main() { Line 56  int LSCPInstrumentLoader::Main() {
56              command_t cmd;              command_t cmd;
57              pQueue->pop(&cmd);              pQueue->pop(&cmd);
58              try {              try {
59                  cmd.pEngine->LoadInstrument();                  cmd.pEngineChannel->LoadInstrument();
60              }              }
61              catch (LinuxSamplerException e) {              catch (LinuxSamplerException e) {
62                  e.PrintMessage();                  e.PrintMessage();
63              }              }
             // Always re-enable the engine.  
             cmd.pEngine->Enable();  
64          }          }
65    
66          // nothing left to do, sleep until new jobs arrive          // nothing left to do, sleep until new jobs arrive

Legend:
Removed from v.410  
changed lines
  Added in v.411

  ViewVC Help
Powered by ViewVC