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

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

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

revision 554 by schoenebeck, Thu May 19 19:25:14 2005 UTC revision 660 by schoenebeck, Fri Jun 17 19:49:30 2005 UTC
# Line 60  namespace LinuxSampler { namespace gig { Line 60  namespace LinuxSampler { namespace gig {
60      }      }
61    
62      /**      /**
63         * Implementation of virtual method from abstract EngineChannel interface.
64         * This method will periodically be polled (e.g. by the LSCP server) to
65         * check if some engine channel parameter has changed since the last
66         * StatusChanged() call.
67         *
68         * TODO: This "poll method" is just a lazy solution and might be
69         *       replaced in future.
70         *
71         * @returns true if engine channel status has changed since last
72         *          StatusChanged() call
73         */
74        bool EngineChannel::StatusChanged() {
75            bool b = bStatusChanged;
76            bStatusChanged = false;
77            return b;
78        }
79    
80        /**
81       * This method is not thread safe!       * This method is not thread safe!
82       */       */
83      void EngineChannel::ResetInternal() {      void EngineChannel::ResetInternal() {
# Line 96  namespace LinuxSampler { namespace gig { Line 114  namespace LinuxSampler { namespace gig {
114          pEventQueue->init();          pEventQueue->init();
115    
116          if (pEngine) pEngine->ResetInternal();          if (pEngine) pEngine->ResetInternal();
117    
118            // status of engine channel has changed, so set notify flag
119            bStatusChanged = true;
120      }      }
121    
122      LinuxSampler::Engine* EngineChannel::GetEngine() {      LinuxSampler::Engine* EngineChannel::GetEngine() {
# Line 208  namespace LinuxSampler { namespace gig { Line 229  namespace LinuxSampler { namespace gig {
229      void EngineChannel::ResourceUpdated(::gig::Instrument* pOldResource, ::gig::Instrument* pNewResource, void* pUpdateArg) {      void EngineChannel::ResourceUpdated(::gig::Instrument* pOldResource, ::gig::Instrument* pNewResource, void* pUpdateArg) {
230          this->pInstrument = pNewResource; //TODO: there are couple of engine parameters we should update here as well if the instrument was updated (see LoadInstrument())          this->pInstrument = pNewResource; //TODO: there are couple of engine parameters we should update here as well if the instrument was updated (see LoadInstrument())
231          if (pEngine) pEngine->Enable();          if (pEngine) pEngine->Enable();
232            bStatusChanged = true; // status of engine has changed, so set notify flag
233      }      }
234    
235      /**      /**
# Line 219  namespace LinuxSampler { namespace gig { Line 241  namespace LinuxSampler { namespace gig {
241      void EngineChannel::OnResourceProgress(float fProgress) {      void EngineChannel::OnResourceProgress(float fProgress) {
242          this->InstrumentStat = int(fProgress * 100.0f);          this->InstrumentStat = int(fProgress * 100.0f);
243          dmsg(7,("gig::EngineChannel: progress %d%", InstrumentStat));          dmsg(7,("gig::EngineChannel: progress %d%", InstrumentStat));
244            bStatusChanged = true; // status of engine has changed, so set notify flag
245      }      }
246    
247      void EngineChannel::Connect(AudioOutputDevice* pAudioOut) {      void EngineChannel::Connect(AudioOutputDevice* pAudioOut) {
# Line 446  namespace LinuxSampler { namespace gig { Line 469  namespace LinuxSampler { namespace gig {
469    
470      void EngineChannel::Volume(float f) {      void EngineChannel::Volume(float f) {
471          GlobalVolume = f;          GlobalVolume = f;
472            bStatusChanged = true; // status of engine channel has changed, so set notify flag
473      }      }
474    
475      uint EngineChannel::Channels() {      uint EngineChannel::Channels() {
# Line 471  namespace LinuxSampler { namespace gig { Line 495  namespace LinuxSampler { namespace gig {
495      String EngineChannel::EngineName() {      String EngineChannel::EngineName() {
496          return LS_GIG_ENGINE_NAME;          return LS_GIG_ENGINE_NAME;
497      }      }
498        
499  }} // namespace LinuxSampler::gig  }} // namespace LinuxSampler::gig

Legend:
Removed from v.554  
changed lines
  Added in v.660

  ViewVC Help
Powered by ViewVC