/[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 410 by schoenebeck, Fri Oct 8 21:03:32 2004 UTC revision 411 by schoenebeck, Sat Feb 26 02:01:14 2005 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6     *   Copyright (C) 2005 Christian Schoenebeck                              *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 200  namespace LinuxSampler { Line 201  namespace LinuxSampler {
201          }          }
202      }      }
203    
204      void AudioOutputDevice::Connect(Engine* pEngine) {      void AudioOutputDevice::Connect(EngineChannel* pEngineChannel) {
205          if (Engines.find(pEngine) == Engines.end()) {          if (EngineChannels.find(pEngineChannel) == EngineChannels.end()) {
206              pEngine->Connect(this);              pEngineChannel->Connect(this);
207              Engines.insert(pEngine);              EngineChannels.insert(pEngineChannel);
208          }          }
209      }      }
210    
211      void AudioOutputDevice::Disconnect(Engine* pEngine) {      void AudioOutputDevice::Disconnect(EngineChannel* pEngineChannel) {
212          if (Engines.find(pEngine) != Engines.end()) { // if clause to prevent disconnect loop          if (EngineChannels.find(pEngineChannel) != EngineChannels.end()) { // if clause to prevent disconnect loop
213              Engines.erase(pEngine);              EngineChannels.erase(pEngineChannel);
214              pEngine->DisconnectAudioOutputDevice();              pEngineChannel->DisconnectAudioOutputDevice();
215          }          }
216      }      }
217    
# Line 248  namespace LinuxSampler { Line 249  namespace LinuxSampler {
249          try          try
250          #endif // USE_EXCEPTIONS          #endif // USE_EXCEPTIONS
251          {          {
252              std::set<Engine*>::iterator iterEngine = Engines.begin();              std::set<EngineChannel*>::iterator iterEngineCh = EngineChannels.begin();
253              std::set<Engine*>::iterator end        = Engines.end();              std::set<EngineChannel*>::iterator end          = EngineChannels.end();
254              for (; iterEngine != end; iterEngine++) {              for (; iterEngineCh != end; iterEngineCh++) {
255                  int res = (*iterEngine)->RenderAudio(Samples);                  int res = (*iterEngineCh)->RenderAudio(Samples);
256                  if (res != 0) result = res;                  if (res != 0) result = res;
257              }              }
258          }          }

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

  ViewVC Help
Powered by ViewVC