pub(crate) unsafe fn hw_set_channels(
    pcm: *mut c_void,
    params: *mut c_void,
    hw_params: u8,
) -> Result<(), i64> {
    ALSA.with(|alsa| {
        let alsa = if let Some(alsa) = alsa {
            alsa
        } else {
            return Err(0);
        };
        let ret = (alsa.snd_pcm_hw_params_set_channels)(
            pcm,
            params,
            hw_params.into(),
        );
        let _: u64 = ret.try_into().map_err(|_| ret)?;
        Ok(())
    })
}
/// Set the configured channel count.
Set the configured channel count.
Set the configured channel count .
pub(crate) unsafe fn hw_set_channels(
    pcm: *mut c_void,
    params: *mut c_void,
    hw_params: u8,
) -> Result<(), i64> {
    ALSA.with(|alsa| {
        let alsa = if let Some(alsa) = alsa {
            alsa
        } else {
            return Err(0);
        };
        let ret = (alsa.snd_pcm_hw_params_set_channels)(
            pcm,
            params,
            hw_params.into(),
        );
        let _: u64 = ret.try_into().map_err(|_| ret)?;
        Ok(())
    })
}
pub ( crate ) unsafe fn hw_set_channels ( pcm : * mut c_void , params : * mut c_void , hw_params : u8 , ) -> Result < ( ) , i64 > { ALSA . with ( | alsa | { let alsa = if let Some ( alsa ) = alsa { alsa } else { return Err ( 0 ) ; } ; let ret = ( alsa . snd_pcm_hw_params_set_channels ) ( pcm , params , hw_params . into ( ) , ) ; let _ : u64 = ret . try_into ( ) . map_err ( | _ | ret ) ? ; Ok ( ( ) ) } ) }
Set the configured channel count.
Set the configured channel count .
pcm
*mut c_void
params
*mut c_void
hw_params
u8
pcm
*mut c_void
params
*mut c_void
hw_params
u8