pub fn copy_from_waveformatex_ptr(ptr: *const mmreg::WAVEFORMATEX) -> Option<Self> {
        unsafe {
            match (*ptr).wFormatTag {
                mmreg::WAVE_FORMAT_PCM | mmreg::WAVE_FORMAT_IEEE_FLOAT => {
                    Some(WaveFormat::Ex(*ptr))
                }
                mmreg::WAVE_FORMAT_EXTENSIBLE => {
                    let extensible_ptr = ptr as *const mmreg::WAVEFORMATEXTENSIBLE;
                    Some(WaveFormat::Extensible(*extensible_ptr))
                }
                _ => None,
            }
        }
    }
// Given a pointer to some format, returns a valid copy of the format.
Given a pointer to some format, returns a valid copy of the format.
Given a pointer to some format returns a valid copy of the format .
pub fn copy_from_waveformatex_ptr(ptr: *const mmreg::WAVEFORMATEX) -> Option<Self> {
        unsafe {
            match (*ptr).wFormatTag {
                mmreg::WAVE_FORMAT_PCM | mmreg::WAVE_FORMAT_IEEE_FLOAT => {
                    Some(WaveFormat::Ex(*ptr))
                }
                mmreg::WAVE_FORMAT_EXTENSIBLE => {
                    let extensible_ptr = ptr as *const mmreg::WAVEFORMATEXTENSIBLE;
                    Some(WaveFormat::Extensible(*extensible_ptr))
                }
                _ => None,
            }
        }
    }
pub fn copy_from_waveformatex_ptr ( ptr : * const mmreg :: WAVEFORMATEX ) -> Option < Self > { unsafe { match ( * ptr ) . wFormatTag { mmreg :: WAVE_FORMAT_PCM | mmreg :: WAVE_FORMAT_IEEE_FLOAT => { Some ( WaveFormat :: Ex ( * ptr ) ) } mmreg :: WAVE_FORMAT_EXTENSIBLE => { let extensible_ptr = ptr as * const mmreg :: WAVEFORMATEXTENSIBLE ; Some ( WaveFormat :: Extensible ( * extensible_ptr ) ) } _ => None , } } }
Given a pointer to some format, returns a valid copy of the format.
Given a pointer to some format returns a valid copy of the format .
ptr
*const mmreg::WAVEFORMATEX
ptr
*const mmreg::WAVEFORMATEX