Rename FormatsEnumerationError to SupportedFormatsError

This more tightly associates the error with the device method on which
this might occur.
This commit is contained in:
mitchmindtree 2019-06-20 21:16:39 +02:00
parent 1275db805b
commit 0f27c1e0bb
7 changed files with 39 additions and 39 deletions

View file

@ -5,7 +5,7 @@ use ChannelCount;
use CreationError;
use DefaultFormatError;
use Format;
use FormatsEnumerationError;
use SupportedFormatsError;
use Sample;
use SampleFormat;
use SampleRate;
@ -108,7 +108,7 @@ impl Device {
fn supported_formats(
&self,
scope: AudioObjectPropertyScope,
) -> Result<SupportedOutputFormats, FormatsEnumerationError>
) -> Result<SupportedOutputFormats, SupportedFormatsError>
{
let mut property_address = AudioObjectPropertyAddress {
mSelector: kAudioDevicePropertyStreamConfiguration,
@ -212,11 +212,11 @@ impl Device {
}
}
pub fn supported_input_formats(&self) -> Result<SupportedOutputFormats, FormatsEnumerationError> {
pub fn supported_input_formats(&self) -> Result<SupportedOutputFormats, SupportedFormatsError> {
self.supported_formats(kAudioObjectPropertyScopeInput)
}
pub fn supported_output_formats(&self) -> Result<SupportedOutputFormats, FormatsEnumerationError> {
pub fn supported_output_formats(&self) -> Result<SupportedOutputFormats, SupportedFormatsError> {
self.supported_formats(kAudioObjectPropertyScopeOutput)
}