[][src]Function portaudio_rs::device::get_from_host_api_device_index

pub fn get_from_host_api_device_index(
    host_api: HostApiIndex,
    host_api_device_index: u32
) -> Result<DeviceIndex, PaError>

Converts a device index from a specific host API to a global device index

Returns Err(InvalidHostApi) when the host_api is out of range, and Err(InvalidDevice) when host_api_device_index is out of range.

// We retrieve the index of device 3 of api 1
let device_index = match portaudio_rs::device::get_from_host_api_device_index(1, 3)
{
    Ok(n) => n,
    Err(e) => { println!("Error: {:?}", e); return },
};