/[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 226 by schoenebeck, Wed Aug 25 22:00:33 2004 UTC revision 554 by schoenebeck, Thu May 19 19:25: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 202  namespace LinuxSampler { Line 203  namespace LinuxSampler {
203    
204      void AudioOutputDevice::Connect(Engine* pEngine) {      void AudioOutputDevice::Connect(Engine* pEngine) {
205          if (Engines.find(pEngine) == Engines.end()) {          if (Engines.find(pEngine) == Engines.end()) {
             pEngine->Connect(this);  
206              Engines.insert(pEngine);              Engines.insert(pEngine);
207                // make sure the engine knows about the connection
208                //pEngine->Connect(this);
209          }          }
210      }      }
211    
212      void AudioOutputDevice::Disconnect(Engine* pEngine) {      void AudioOutputDevice::Disconnect(Engine* pEngine) {
213          if (Engines.find(pEngine) != Engines.end()) { // if clause to prevent disconnect loop          if (Engines.find(pEngine) != Engines.end()) { // if clause to prevent disconnect loop
214              Engines.erase(pEngine);              Engines.erase(pEngine);
215              pEngine->DisconnectAudioOutputDevice();              // make sure the engine knows about the disconnection
216                //pEngine->DisconnectAudioOutputDevice();
217          }          }
218      }      }
219    
# Line 244  namespace LinuxSampler { Line 247  namespace LinuxSampler {
247          int result = 0;          int result = 0;
248    
249          // let all connected engines render audio for the current audio fragment cycle          // let all connected engines render audio for the current audio fragment cycle
250            #if CONFIG_RT_EXCEPTIONS
251            try
252            #endif // CONFIG_RT_EXCEPTIONS
253          {          {
254              std::set<Engine*>::iterator iterEngine = Engines.begin();              std::set<Engine*>::iterator iterEngine = Engines.begin();
255              std::set<Engine*>::iterator end        = Engines.end();              std::set<Engine*>::iterator end        = Engines.end();
# Line 252  namespace LinuxSampler { Line 258  namespace LinuxSampler {
258                  if (res != 0) result = res;                  if (res != 0) result = res;
259              }              }
260          }          }
261            #if CONFIG_RT_EXCEPTIONS
262            catch (std::runtime_error se) {
263                std::cerr << "std::runtime_error: " << se.what() << std::endl << std::flush;
264                exit(EXIT_FAILURE);
265            }
266            #endif // CONFIG_RT_EXCEPTIONS
267    
268          return result;          return result;
269      }      }

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

  ViewVC Help
Powered by ViewVC