pub async fn find_devices() -> Result<Vec<DigitalAudioInterface>, Error> {
    let directory_proxy = open_directory_in_namespace(DAI_DEVICE_DIR, OPEN_RIGHT_READABLE)?;

    let files = files_async::readdir(&directory_proxy).await?;

    let paths: Vec<_> =
        files.iter().map(|file| Path::new(DAI_DEVICE_DIR).join(&file.name)).collect();

    let devices = paths.iter().map(|path| DigitalAudioInterface::new(&path)).collect();

    Ok(devices)
}
/// Finds any DAI devices, connects to any that are available and provides
Finds any DAI devices, connects to any that are available and provides
Finds any DAI devices connects to any that are available and provides
pub async fn find_devices() -> Result<Vec<DigitalAudioInterface>, Error> {
    let directory_proxy = open_directory_in_namespace(DAI_DEVICE_DIR, OPEN_RIGHT_READABLE)?;
    let files = files_async::readdir(&directory_proxy).await?;
    let paths: Vec<_> =
        files.iter().map(|file| Path::new(DAI_DEVICE_DIR).join(&file.name)).collect();
    let devices = paths.iter().map(|path| DigitalAudioInterface::new(&path)).collect();
    Ok(devices)
}
pub async fn find_devices ( ) -> Result < Vec < DigitalAudioInterface > , Error > { let directory_proxy = open_directory_in_namespace ( DAI_DEVICE_DIR , OPEN_RIGHT_READABLE ) ? ; let files = files_async :: readdir ( & directory_proxy ) . await ? ; let paths : Vec < _ > = files . iter ( ) . map ( | file | Path :: new ( DAI_DEVICE_DIR ) . join ( & file . name ) ) . collect ( ) ; let devices = paths . iter ( ) . map ( | path | DigitalAudioInterface :: new ( & path ) ) . collect ( ) ; Ok ( devices ) }
Finds any DAI devices, connects to any that are available and provides
Finds any DAI devices connects to any that are available and provides