Add new DeviceNameError type
The coreaudio and wasapi backends may both potentially fail to produce the name associated with a device. This changes the API to allow for returning the errors in these cases.
This commit is contained in:
parent
78a7cb9e79
commit
105086a108
6 changed files with 54 additions and 19 deletions
|
|
@ -5,6 +5,7 @@ use std::marker::PhantomData;
|
|||
use BuildStreamError;
|
||||
use DefaultFormatError;
|
||||
use DevicesError;
|
||||
use DeviceNameError;
|
||||
use Format;
|
||||
use SupportedFormatsError;
|
||||
use StreamData;
|
||||
|
|
@ -107,8 +108,8 @@ impl Device {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn name(&self) -> String {
|
||||
"null".to_owned()
|
||||
pub fn name(&self) -> Result<String, DeviceNameError> {
|
||||
Ok("null".to_owned())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue