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 * |
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 |
|
|
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); |
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; |