/[svn]/linuxsampler/trunk/src/drivers/audio/AudioOutputDevice.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/audio/AudioOutputDevice.cpp

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

revision 411 by schoenebeck, Sat Feb 26 02:01:14 2005 UTC revision 412 by schoenebeck, Sat Feb 26 22:44:51 2005 UTC
# Line 201  namespace LinuxSampler { Line 201  namespace LinuxSampler {
201          }          }
202      }      }
203    
204      void AudioOutputDevice::Connect(EngineChannel* pEngineChannel) {      void AudioOutputDevice::Connect(Engine* pEngine) {
205          if (EngineChannels.find(pEngineChannel) == EngineChannels.end()) {          if (Engines.find(pEngine) == Engines.end()) {
206              pEngineChannel->Connect(this);              Engines.insert(pEngine);
207              EngineChannels.insert(pEngineChannel);              // make sure the engine knows about the connection
208                //pEngine->Connect(this);
209          }          }
210      }      }
211    
212      void AudioOutputDevice::Disconnect(EngineChannel* pEngineChannel) {      void AudioOutputDevice::Disconnect(Engine* pEngine) {
213          if (EngineChannels.find(pEngineChannel) != EngineChannels.end()) { // if clause to prevent disconnect loop          if (Engines.find(pEngine) != Engines.end()) { // if clause to prevent disconnect loop
214              EngineChannels.erase(pEngineChannel);              Engines.erase(pEngine);
215              pEngineChannel->DisconnectAudioOutputDevice();              // make sure the engine knows about the disconnection
216                //pEngine->DisconnectAudioOutputDevice();
217          }          }
218      }      }
219    
# Line 249  namespace LinuxSampler { Line 251  namespace LinuxSampler {
251          try          try
252          #endif // USE_EXCEPTIONS          #endif // USE_EXCEPTIONS
253          {          {
254              std::set<EngineChannel*>::iterator iterEngineCh = EngineChannels.begin();              std::set<Engine*>::iterator iterEngine = Engines.begin();
255              std::set<EngineChannel*>::iterator end          = EngineChannels.end();              std::set<Engine*>::iterator end        = Engines.end();
256              for (; iterEngineCh != end; iterEngineCh++) {              for (; iterEngine != end; iterEngine++) {
257                  int res = (*iterEngineCh)->RenderAudio(Samples);                  int res = (*iterEngine)->RenderAudio(Samples);
258                  if (res != 0) result = res;                  if (res != 0) result = res;
259              }              }
260          }          }

Legend:
Removed from v.411  
changed lines
  Added in v.412

  ViewVC Help
Powered by ViewVC