156 |
} |
} |
157 |
|
|
158 |
DeviceCreationParameter* AudioOutputDeviceFactory::GetDriverParameter(String DriverName, String ParameterName) throw (Exception) { |
DeviceCreationParameter* AudioOutputDeviceFactory::GetDriverParameter(String DriverName, String ParameterName) throw (Exception) { |
159 |
std::map<String,DeviceCreationParameter*> parameters = GetAvailableDriverParameters(DriverName); |
if (!InnerFactories.count(DriverName)) throw Exception("There is no audio output driver '" + DriverName + "'."); |
160 |
if (!parameters.count(ParameterName)) throw Exception("Audio output driver '" + DriverName + "' does not have a parameter '" + ParameterName + "'."); |
DeviceParameterFactory* pParamFactory = ParameterFactories[DriverName]; |
161 |
return parameters[ParameterName]; |
if (pParamFactory) { |
162 |
|
try { return pParamFactory->Create(ParameterName); } |
163 |
|
catch(Exception e) { } |
164 |
|
} |
165 |
|
throw Exception("Audio output driver '" + DriverName + "' does not have a parameter '" + ParameterName + "'."); |
166 |
} |
} |
167 |
|
|
168 |
String AudioOutputDeviceFactory::GetDriverDescription(String DriverName) throw (Exception) { |
String AudioOutputDeviceFactory::GetDriverDescription(String DriverName) throw (Exception) { |