in cubeb-core/src/stream.rs [304:337]
fn stream_params_raw_layout() {
let mut raw: super::ffi::cubeb_stream_params = unsafe { mem::zeroed() };
macro_rules! check(
($($raw:ident => $real:ident),*) => (
$(raw.layout = super::ffi::$raw;
let params = unsafe {
StreamParamsRef::from_ptr(&mut raw)
};
assert_eq!(params.layout(), super::ChannelLayout::$real);
)*
) );
check!(CUBEB_LAYOUT_UNDEFINED => UNDEFINED,
CUBEB_LAYOUT_MONO => MONO,
CUBEB_LAYOUT_MONO_LFE => MONO_LFE,
CUBEB_LAYOUT_STEREO => STEREO,
CUBEB_LAYOUT_STEREO_LFE => STEREO_LFE,
CUBEB_LAYOUT_3F => _3F,
CUBEB_LAYOUT_3F_LFE => _3F_LFE,
CUBEB_LAYOUT_2F1 => _2F1,
CUBEB_LAYOUT_2F1_LFE => _2F1_LFE,
CUBEB_LAYOUT_3F1 => _3F1,
CUBEB_LAYOUT_3F1_LFE => _3F1_LFE,
CUBEB_LAYOUT_2F2 => _2F2,
CUBEB_LAYOUT_2F2_LFE => _2F2_LFE,
CUBEB_LAYOUT_QUAD => QUAD,
CUBEB_LAYOUT_QUAD_LFE => QUAD_LFE,
CUBEB_LAYOUT_3F2 => _3F2,
CUBEB_LAYOUT_3F2_LFE => _3F2_LFE,
CUBEB_LAYOUT_3F2_BACK => _3F2_BACK,
CUBEB_LAYOUT_3F2_LFE_BACK => _3F2_LFE_BACK,
CUBEB_LAYOUT_3F3R_LFE => _3F3R_LFE,
CUBEB_LAYOUT_3F4_LFE => _3F4_LFE);
}