pub struct DaiAudioDevice { /* private fields */ }
Implementations§
Source§impl DaiAudioDevice
impl DaiAudioDevice
Sourcepub async fn build(dai: DigitalAudioInterface) -> Result<Self, Error>
pub async fn build(dai: DigitalAudioInterface) -> Result<Self, Error>
Builds an Audio device (input or output) from the DAI device.
The format for the DAI device will be checked for compatibility with dai_format
and that
it can support an audio_core format of audio_format
.
pub fn config( &mut self, dai_format: DaiFormat, pcm_format: PcmFormat, ) -> Result<(), Error>
Sourcepub fn start(
&mut self,
proxy: AudioDeviceEnumeratorProxy,
name: &str,
id: [u8; 16],
manufacturer: &str,
product: &str,
) -> Result<(), Error>
pub fn start( &mut self, proxy: AudioDeviceEnumeratorProxy, name: &str, id: [u8; 16], manufacturer: &str, product: &str, ) -> Result<(), Error>
Register the audio device with audio enumerator proxy
, connecting the DAI to the system,
using id
, manufacturer
and product
as identifiers.
If the device is already registered, returns an error. Otherwise it adds the device and
starts responding appropriately to the Media system for the device.
pub fn dai_formats(&self) -> &Vec<DaiSupportedFormats>
Auto Trait Implementations§
impl Freeze for DaiAudioDevice
impl !RefUnwindSafe for DaiAudioDevice
impl Send for DaiAudioDevice
impl Sync for DaiAudioDevice
impl Unpin for DaiAudioDevice
impl !UnwindSafe for DaiAudioDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more