/[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 1398 by schoenebeck, Fri Sep 14 14:45:11 2007 UTC revision 1399 by schoenebeck, Thu Oct 11 18:53:29 2007 UTC
# Line 189  namespace LinuxSampler { namespace gig { Line 189  namespace LinuxSampler { namespace gig {
189       * engine afterwards by calling @c ResumeAll() later on!       * engine afterwards by calling @c ResumeAll() later on!
190       */       */
191      void Engine::SuspendAll() {      void Engine::SuspendAll() {
192          dmsg(1,("gig::Engine: Suspending all ...\n"));          dmsg(2,("gig::Engine: Suspending all ...\n"));
193          // stop the engine, so we can safely modify the engine's          // stop the engine, so we can safely modify the engine's
194          // data structures from this foreign thread          // data structures from this foreign thread
195          DisableAndLock();          DisableAndLock();
# Line 223  namespace LinuxSampler { namespace gig { Line 223  namespace LinuxSampler { namespace gig {
223              if (!iPendingStreamDeletions) break;              if (!iPendingStreamDeletions) break;
224              usleep(10000); // sleep for 10ms              usleep(10000); // sleep for 10ms
225          }          }
226          dmsg(1,("gig::Engine: Everything suspended.\n"));          dmsg(2,("gig::Engine: Everything suspended.\n"));
227      }      }
228    
229      /**      /**
# Line 245  namespace LinuxSampler { namespace gig { Line 245  namespace LinuxSampler { namespace gig {
245       * @param pRegion - region the engine shall stop using       * @param pRegion - region the engine shall stop using
246       */       */
247      void Engine::Suspend(::gig::Region* pRegion) {      void Engine::Suspend(::gig::Region* pRegion) {
248          dmsg(1,("gig::Engine: Suspending Region %x ...\n",pRegion));          dmsg(2,("gig::Engine: Suspending Region %x ...\n",pRegion));
249          SuspendedRegionsMutex.Lock();          SuspendedRegionsMutex.Lock();
250          SuspensionChangeOngoing.Set(true);          SuspensionChangeOngoing.Set(true);
251          pPendingRegionSuspension = pRegion;          pPendingRegionSuspension = pRegion;
252          SuspensionChangeOngoing.WaitAndUnlockIf(true);          SuspensionChangeOngoing.WaitAndUnlockIf(true);
253          SuspendedRegionsMutex.Unlock();          SuspendedRegionsMutex.Unlock();
254          dmsg(1,("gig::Engine: Region %x suspended.",pRegion));          dmsg(2,("gig::Engine: Region %x suspended.",pRegion));
255      }      }
256    
257      /**      /**
# Line 261  namespace LinuxSampler { namespace gig { Line 261  namespace LinuxSampler { namespace gig {
261       * @param pRegion - region the engine shall be allowed to use again       * @param pRegion - region the engine shall be allowed to use again
262       */       */
263      void Engine::Resume(::gig::Region* pRegion) {      void Engine::Resume(::gig::Region* pRegion) {
264          dmsg(1,("gig::Engine: Resuming Region %x ...\n",pRegion));          dmsg(2,("gig::Engine: Resuming Region %x ...\n",pRegion));
265          SuspendedRegionsMutex.Lock();          SuspendedRegionsMutex.Lock();
266          SuspensionChangeOngoing.Set(true);          SuspensionChangeOngoing.Set(true);
267          pPendingRegionResumption = pRegion;          pPendingRegionResumption = pRegion;
268          SuspensionChangeOngoing.WaitAndUnlockIf(true);          SuspensionChangeOngoing.WaitAndUnlockIf(true);
269          SuspendedRegionsMutex.Unlock();          SuspendedRegionsMutex.Unlock();
270          dmsg(1,("gig::Engine: Region %x resumed.\n",pRegion));          dmsg(2,("gig::Engine: Region %x resumed.\n",pRegion));
271      }      }
272    
273      /**      /**
# Line 1975  namespace LinuxSampler { namespace gig { Line 1975  namespace LinuxSampler { namespace gig {
1975      }      }
1976    
1977      String Engine::Version() {      String Engine::Version() {
1978          String s = "$Revision: 1.81 $";          String s = "$Revision: 1.82 $";
1979          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
1980      }      }
1981    

Legend:
Removed from v.1398  
changed lines
  Added in v.1399

  ViewVC Help
Powered by ViewVC