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 |
|
|
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 |
|
|