in cubeb-core/src/stream.rs [259:275]
fn stream_params_raw_format() {
let mut raw: super::ffi::cubeb_stream_params = unsafe { mem::zeroed() };
macro_rules! check(
($($raw:ident => $real:ident),*) => (
$(raw.format = super::ffi::$raw;
let params = unsafe {
StreamParamsRef::from_ptr(&mut raw)
};
assert_eq!(params.format(), super::SampleFormat::$real);
)*
) );
check!(CUBEB_SAMPLE_S16LE => S16LE,
CUBEB_SAMPLE_S16BE => S16BE,
CUBEB_SAMPLE_FLOAT32LE => Float32LE,
CUBEB_SAMPLE_FLOAT32BE => Float32BE);
}