/[svn]/linuxsampler/trunk/src/drivers/audio/AudioOutputDeviceFactory.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/audio/AudioOutputDeviceFactory.h

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

revision 1888 by persson, Fri Jun 22 10:10:06 2007 UTC revision 1889 by persson, Sun Apr 26 12:19:00 2009 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, 2006 Christian Schoenebeck                        *   *   Copyright (C) 2005 - 2009 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 61  namespace LinuxSampler { Line 61  namespace LinuxSampler {
61                        AudioOutputDeviceFactory::ParameterFactories[Driver_T::Name()] = new DeviceParameterFactory();                        AudioOutputDeviceFactory::ParameterFactories[Driver_T::Name()] = new DeviceParameterFactory();
62                    }                    }
63                    ~InnerFactoryRegistrator() {                    ~InnerFactoryRegistrator() {
64                        std::map<String, InnerFactory*>::iterator iter = AudioOutputDeviceFactory::InnerFactories.find(Driver_T::Name());                        AudioOutputDeviceFactory::Unregister(Driver_T::Name());
                       delete iter->second;  
                       AudioOutputDeviceFactory::InnerFactories.erase(iter);  
   
                       std::map<String, DeviceParameterFactory*>::iterator iterpf = AudioOutputDeviceFactory::ParameterFactories.find(Driver_T::Name());  
                       delete iterpf->second;  
                       AudioOutputDeviceFactory::ParameterFactories.erase(iterpf);  
65                    }                    }
66            };            };
67    
# Line 77  namespace LinuxSampler { Line 71  namespace LinuxSampler {
71                    ParameterRegistrator() {                    ParameterRegistrator() {
72                        DeviceParameterFactory::Register<Parameter_T>(AudioOutputDeviceFactory::ParameterFactories[Driver_T::Name()]);                        DeviceParameterFactory::Register<Parameter_T>(AudioOutputDeviceFactory::ParameterFactories[Driver_T::Name()]);
73                    }                    }
                   ~ParameterRegistrator() {  
                       DeviceParameterFactory::Unregister<Parameter_T>(AudioOutputDeviceFactory::ParameterFactories[Driver_T::Name()]);  
                   }  
74            };            };
75    
76            static AudioOutputDevice*                        Create(String DriverName, std::map<String,String> Parameters) throw (Exception);            static AudioOutputDevice*                        Create(String DriverName, std::map<String,String> Parameters) throw (Exception);
# Line 89  namespace LinuxSampler { Line 80  namespace LinuxSampler {
80            static DeviceCreationParameter*                  GetDriverParameter(String DriverName, String ParameterName) throw (Exception);            static DeviceCreationParameter*                  GetDriverParameter(String DriverName, String ParameterName) throw (Exception);
81            static String                                    GetDriverDescription(String DriverName) throw (Exception);            static String                                    GetDriverDescription(String DriverName) throw (Exception);
82            static String                                    GetDriverVersion(String DriverName) throw (Exception);            static String                                    GetDriverVersion(String DriverName) throw (Exception);
83              static void                                      Unregister(String DriverName);
84    
85  //      protected: /* FIXME: fields below should be protected, causes errors on gcc 2.95 though */  //      protected: /* FIXME: fields below should be protected, causes errors on gcc 2.95 though */
86            static std::map<String, InnerFactory*> InnerFactories;            static std::map<String, InnerFactory*> InnerFactories;

Legend:
Removed from v.1888  
changed lines
  Added in v.1889

  ViewVC Help
Powered by ViewVC