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

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

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

revision 385 by schoenebeck, Thu Feb 17 02:53:45 2005 UTC revision 390 by schoenebeck, Fri Feb 18 03:58:55 2005 UTC
# Line 23  Line 23 
23    
24  #include "../common/global.h"  #include "../common/global.h"
25  #include "../common/Thread.h"  #include "../common/Thread.h"
26    #include "../common/Condition.h"
27  #include "../common/RingBuffer.h"  #include "../common/RingBuffer.h"
28  #include "../Sampler.h"  #include "../Sampler.h"
29    
# Line 34  using namespace LinuxSampler; Line 35  using namespace LinuxSampler;
35  /**  /**
36   * Instrument loader thread for the LinuxSampler Control Protocol (LSCP)   * Instrument loader thread for the LinuxSampler Control Protocol (LSCP)
37   * Server for loading instruments in the background. This loader will only   * Server for loading instruments in the background. This loader will only
38   * load one instrument by one.   * load one instrument by one. The thread will actually only be created once
39     * StartnewLoad() method was called the first time. After that the thread
40     * will exist for the whole life time of the LSCPInstrumentLoader instance
41     * and just block until new loading jobs arrive.
42   */   */
43  class LSCPInstrumentLoader : public Thread {  class LSCPInstrumentLoader : public Thread {
44      public:      public:
# Line 43  class LSCPInstrumentLoader : public Thre Line 47  class LSCPInstrumentLoader : public Thre
47          virtual ~LSCPInstrumentLoader();          virtual ~LSCPInstrumentLoader();
48      protected:      protected:
49          struct command_t {          struct command_t {
50              String  Filename;              String* pFilename;
51              uint    uiInstrumentIndex;              uint    uiInstrumentIndex;
52              Engine* pEngine;              Engine* pEngine;
53          };          };
54    
55          // Instance variables.          // Instance variables.
56          RingBuffer<command_t>* pQueue; ///< queue with commands for loading new instruments.          RingBuffer<command_t>* pQueue; ///< queue with commands for loading new instruments.
57            Condition              conditionJobsLeft; ///< synchronizer to block this thread until a new job arrives
58    
59          int Main(); ///< Implementation of virtual method from class Thread.          int Main(); ///< Implementation of virtual method from class Thread.
60  };  };

Legend:
Removed from v.385  
changed lines
  Added in v.390

  ViewVC Help
Powered by ViewVC