/[svn]/linuxsampler/trunk/src/audiodriver/AudioOutputDeviceFactory.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/audiodriver/AudioOutputDeviceFactory.cpp

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

revision 168 by schoenebeck, Mon Jun 14 19:33:16 2004 UTC revision 169 by senkov, Fri Jul 2 23:49:12 2004 UTC
# Line 27  namespace LinuxSampler { Line 27  namespace LinuxSampler {
27      std::map<String, AudioOutputDeviceFactory::InnerFactory*> AudioOutputDeviceFactory::InnerFactories;      std::map<String, AudioOutputDeviceFactory::InnerFactory*> AudioOutputDeviceFactory::InnerFactories;
28    
29      AudioOutputDevice* AudioOutputDeviceFactory::Create(String DriverName, std::map<String,String>& Parameters) throw (LinuxSamplerException) {      AudioOutputDevice* AudioOutputDeviceFactory::Create(String DriverName, std::map<String,String>& Parameters) throw (LinuxSamplerException) {
30          if (!InnerFactories[DriverName]) throw LinuxSamplerException("There is no audio output driver '" + DriverName + "'.");          if (!InnerFactories.count(DriverName)) throw LinuxSamplerException("There is no audio output driver '" + DriverName + "'.");
31          return InnerFactories[DriverName]->Create(Parameters);          return InnerFactories[DriverName]->Create(Parameters);
32      }      }
33    
# Line 53  namespace LinuxSampler { Line 53  namespace LinuxSampler {
53      }      }
54    
55      std::map<String,DeviceCreationParameter*> AudioOutputDeviceFactory::GetAvailableDriverParameters(String DriverName) throw (LinuxSamplerException) {      std::map<String,DeviceCreationParameter*> AudioOutputDeviceFactory::GetAvailableDriverParameters(String DriverName) throw (LinuxSamplerException) {
56          if (!InnerFactories[DriverName]) throw LinuxSamplerException("There is no audio output driver '" + DriverName + "'.");          if (!InnerFactories.count(DriverName)) throw LinuxSamplerException("There is no audio output driver '" + DriverName + "'.");
57          return InnerFactories[DriverName]->AvailableParameters();          return InnerFactories[DriverName]->AvailableParameters();
58      }      }
59    
60      DeviceCreationParameter* AudioOutputDeviceFactory::GetDriverParameter(String DriverName, String ParameterName) throw (LinuxSamplerException) {      DeviceCreationParameter* AudioOutputDeviceFactory::GetDriverParameter(String DriverName, String ParameterName) throw (LinuxSamplerException) {
61          std::map<String,DeviceCreationParameter*> parameters = GetAvailableDriverParameters(DriverName);          std::map<String,DeviceCreationParameter*> parameters = GetAvailableDriverParameters(DriverName);
62          if (!parameters[ParameterName]) throw LinuxSamplerException("Audio output driver '" + DriverName + "' does not have a parameter '" + ParameterName + "'.");          if (!parameters.count(ParameterName)) throw LinuxSamplerException("Audio output driver '" + DriverName + "' does not have a parameter '" + ParameterName + "'.");
63          return parameters[ParameterName];          return parameters[ParameterName];
64      }      }
65    
66      String AudioOutputDeviceFactory::GetDriverDescription(String DriverName) throw (LinuxSamplerException) {      String AudioOutputDeviceFactory::GetDriverDescription(String DriverName) throw (LinuxSamplerException) {
67          if (!InnerFactories[DriverName]) throw LinuxSamplerException("There is no audio output driver '" + DriverName + "'.");          if (!InnerFactories.count(DriverName)) throw LinuxSamplerException("There is no audio output driver '" + DriverName + "'.");
68          return InnerFactories[DriverName]->Description();          return InnerFactories[DriverName]->Description();
69      }      }
70    
71      String AudioOutputDeviceFactory::GetDriverVersion(String DriverName) throw (LinuxSamplerException) {      String AudioOutputDeviceFactory::GetDriverVersion(String DriverName) throw (LinuxSamplerException) {
72          if (!InnerFactories[DriverName]) throw LinuxSamplerException("There is no audio output driver '" + DriverName + "'.");          if (!InnerFactories.count(DriverName)) throw LinuxSamplerException("There is no audio output driver '" + DriverName + "'.");
73          return InnerFactories[DriverName]->Version();          return InnerFactories[DriverName]->Version();
74      }      }
75    

Legend:
Removed from v.168  
changed lines
  Added in v.169

  ViewVC Help
Powered by ViewVC