/[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 1860 by schoenebeck, Wed Mar 11 18:23:35 2009 UTC revision 1933 by persson, Thu Jul 9 17:37:41 2009 UTC
# Line 113  namespace LinuxSampler { namespace gig { Line 113  namespace LinuxSampler { namespace gig {
113          pVoiceStealingQueue = new RTList<Event>(pEventPool);          pVoiceStealingQueue = new RTList<Event>(pEventPool);
114          pGlobalEvents      = new RTList<Event>(pEventPool);          pGlobalEvents      = new RTList<Event>(pEventPool);
115          iMaxDiskStreams    = GLOBAL_MAX_STREAMS;          iMaxDiskStreams    = GLOBAL_MAX_STREAMS;
116            FrameTime          = 0;
117    
118          for (RTList<Voice>::Iterator iterVoice = pVoicePool->allocAppend(); iterVoice == pVoicePool->last(); iterVoice = pVoicePool->allocAppend()) {          for (RTList<Voice>::Iterator iterVoice = pVoicePool->allocAppend(); iterVoice == pVoicePool->last(); iterVoice = pVoicePool->allocAppend()) {
119              iterVoice->SetEngine(this);              iterVoice->SetEngine(this);
# Line 153  namespace LinuxSampler { namespace gig { Line 154  namespace LinuxSampler { namespace gig {
154    
155      void Engine::Enable() {      void Engine::Enable() {
156          dmsg(3,("gig::Engine: enabling\n"));          dmsg(3,("gig::Engine: enabling\n"));
157          EngineDisabled.PushAndUnlock(false, 2); // set condition object 'EngineDisabled' to false (wait max. 2s)          EngineDisabled.PushAndUnlock(false, 2, 0, true); // set condition object 'EngineDisabled' to false (wait max. 2s)
158          dmsg(3,("gig::Engine: enabled (val=%d)\n", EngineDisabled.GetUnsafe()));          dmsg(3,("gig::Engine: enabled (val=%d)\n", EngineDisabled.GetUnsafe()));
159      }      }
160    
# Line 212  namespace LinuxSampler { namespace gig { Line 213  namespace LinuxSampler { namespace gig {
213                      if (hStream != Stream::INVALID_HANDLE) { // voice actually used a stream                      if (hStream != Stream::INVALID_HANDLE) { // voice actually used a stream
214                          iPendingStreamDeletions++;                          iPendingStreamDeletions++;
215                      }                      }
216                        // free the voice to the voice pool and update key info
217                        FreeVoice(pEngineChannel, itVoice);
218                  }                  }
219              }              }
220          }          }
# Line 443  namespace LinuxSampler { namespace gig { Line 446  namespace LinuxSampler { namespace gig {
446                          if (hStream != Stream::INVALID_HANDLE) { // voice actually used a stream                          if (hStream != Stream::INVALID_HANDLE) { // voice actually used a stream
447                              iPendingStreamDeletions++;                              iPendingStreamDeletions++;
448                          }                          }
449                            //NOTE: maybe we should call FreeVoice() here, shouldn't cause a harm though I think, since the voices should be freed by RenderActiveVoices() in the render loop, they are probably just freed a bit later than they could/should be
450                      }                      }
451                  }                  }
452              }              }
# Line 2219  namespace LinuxSampler { namespace gig { Line 2223  namespace LinuxSampler { namespace gig {
2223      }      }
2224    
2225      String Engine::Version() {      String Engine::Version() {
2226          String s = "$Revision: 1.101 $";          String s = "$Revision: 1.104 $";
2227          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
2228      }      }
2229    

Legend:
Removed from v.1860  
changed lines
  Added in v.1933

  ViewVC Help
Powered by ViewVC