/[svn]/linuxsampler/trunk/src/engines/gig/Engine.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/Engine.cpp

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

revision 1348 by schoenebeck, Fri Sep 14 14:45:11 2007 UTC revision 1555 by schoenebeck, Thu Dec 6 01:39:24 2007 UTC
# Line 29  Line 29 
29    
30  #include "Engine.h"  #include "Engine.h"
31    
32    #include "../../common/global_private.h"
33    
34  namespace LinuxSampler { namespace gig {  namespace LinuxSampler { namespace gig {
35    
36      InstrumentResourceManager Engine::instruments;      InstrumentResourceManager Engine::instruments;
# Line 189  namespace LinuxSampler { namespace gig { Line 191  namespace LinuxSampler { namespace gig {
191       * engine afterwards by calling @c ResumeAll() later on!       * engine afterwards by calling @c ResumeAll() later on!
192       */       */
193      void Engine::SuspendAll() {      void Engine::SuspendAll() {
194          dmsg(1,("gig::Engine: Suspending all ...\n"));          dmsg(2,("gig::Engine: Suspending all ...\n"));
195          // stop the engine, so we can safely modify the engine's          // stop the engine, so we can safely modify the engine's
196          // data structures from this foreign thread          // data structures from this foreign thread
197          DisableAndLock();          DisableAndLock();
# Line 223  namespace LinuxSampler { namespace gig { Line 225  namespace LinuxSampler { namespace gig {
225              if (!iPendingStreamDeletions) break;              if (!iPendingStreamDeletions) break;
226              usleep(10000); // sleep for 10ms              usleep(10000); // sleep for 10ms
227          }          }
228          dmsg(1,("gig::Engine: Everything suspended.\n"));          dmsg(2,("gig::Engine: Everything suspended.\n"));
229      }      }
230    
231      /**      /**
# Line 245  namespace LinuxSampler { namespace gig { Line 247  namespace LinuxSampler { namespace gig {
247       * @param pRegion - region the engine shall stop using       * @param pRegion - region the engine shall stop using
248       */       */
249      void Engine::Suspend(::gig::Region* pRegion) {      void Engine::Suspend(::gig::Region* pRegion) {
250          dmsg(1,("gig::Engine: Suspending Region %x ...\n",pRegion));          dmsg(2,("gig::Engine: Suspending Region %x ...\n",pRegion));
251          SuspendedRegionsMutex.Lock();          SuspendedRegionsMutex.Lock();
252          SuspensionChangeOngoing.Set(true);          SuspensionChangeOngoing.Set(true);
253          pPendingRegionSuspension = pRegion;          pPendingRegionSuspension = pRegion;
254          SuspensionChangeOngoing.WaitAndUnlockIf(true);          SuspensionChangeOngoing.WaitAndUnlockIf(true);
255          SuspendedRegionsMutex.Unlock();          SuspendedRegionsMutex.Unlock();
256          dmsg(1,("gig::Engine: Region %x suspended.",pRegion));          dmsg(2,("gig::Engine: Region %x suspended.",pRegion));
257      }      }
258    
259      /**      /**
# Line 261  namespace LinuxSampler { namespace gig { Line 263  namespace LinuxSampler { namespace gig {
263       * @param pRegion - region the engine shall be allowed to use again       * @param pRegion - region the engine shall be allowed to use again
264       */       */
265      void Engine::Resume(::gig::Region* pRegion) {      void Engine::Resume(::gig::Region* pRegion) {
266          dmsg(1,("gig::Engine: Resuming Region %x ...\n",pRegion));          dmsg(2,("gig::Engine: Resuming Region %x ...\n",pRegion));
267          SuspendedRegionsMutex.Lock();          SuspendedRegionsMutex.Lock();
268          SuspensionChangeOngoing.Set(true);          SuspensionChangeOngoing.Set(true);
269          pPendingRegionResumption = pRegion;          pPendingRegionResumption = pRegion;
270          SuspensionChangeOngoing.WaitAndUnlockIf(true);          SuspensionChangeOngoing.WaitAndUnlockIf(true);
271          SuspendedRegionsMutex.Unlock();          SuspendedRegionsMutex.Unlock();
272          dmsg(1,("gig::Engine: Region %x resumed.\n",pRegion));          dmsg(2,("gig::Engine: Region %x resumed.\n",pRegion));
273      }      }
274    
275      /**      /**
# Line 569  namespace LinuxSampler { namespace gig { Line 571  namespace LinuxSampler { namespace gig {
571       *  @returns       0 on success       *  @returns       0 on success
572       */       */
573      int Engine::RenderAudio(uint Samples) {      int Engine::RenderAudio(uint Samples) {
574          dmsg(7,("RenderAudio(Samples=%d)\n", Samples));          dmsg(8,("RenderAudio(Samples=%d)\n", Samples));
575    
576          // return if engine disabled          // return if engine disabled
577          if (EngineDisabled.Pop()) {          if (EngineDisabled.Pop()) {
# Line 1971  namespace LinuxSampler { namespace gig { Line 1973  namespace LinuxSampler { namespace gig {
1973      }      }
1974    
1975      String Engine::Description() {      String Engine::Description() {
1976          return "Gigasampler Engine";          return "Gigasampler Format Engine";
1977      }      }
1978    
1979      String Engine::Version() {      String Engine::Version() {
1980          String s = "$Revision: 1.81 $";          String s = "$Revision: 1.85 $";
1981          return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword          return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword
1982      }      }
1983    

Legend:
Removed from v.1348  
changed lines
  Added in v.1555

  ViewVC Help
Powered by ViewVC