1 // Copyright © 2017-2018 Mozilla Foundation 2 // 3 // This program is made available under an ISC-style license. See the 4 // accompanying file LICENSE for details. 5 6 use channel::cubeb_channel_layout; 7 use format::cubeb_sample_format; 8 use std::os::raw::{c_int, c_uint, c_void}; 9 10 pub enum cubeb_mixer {} 11 12 extern "C" { cubeb_mixer_create( format: cubeb_sample_format, in_channels: u32, in_layout: cubeb_channel_layout, out_channels: u32, out_layout: cubeb_channel_layout, ) -> *mut cubeb_mixer13 pub fn cubeb_mixer_create( 14 format: cubeb_sample_format, 15 in_channels: u32, 16 in_layout: cubeb_channel_layout, 17 out_channels: u32, 18 out_layout: cubeb_channel_layout, 19 ) -> *mut cubeb_mixer; cubeb_mixer_destroy(mixer: *mut cubeb_mixer)20 pub fn cubeb_mixer_destroy(mixer: *mut cubeb_mixer); cubeb_mixer_mix( mixer: *mut cubeb_mixer, frames: usize, input_buffer: *const c_void, input_buffer_length: usize, output_buffer: *mut c_void, output_buffer_length: usize, ) -> c_int21 pub fn cubeb_mixer_mix( 22 mixer: *mut cubeb_mixer, 23 frames: usize, 24 input_buffer: *const c_void, 25 input_buffer_length: usize, 26 output_buffer: *mut c_void, 27 output_buffer_length: usize, 28 ) -> c_int; 29 cubeb_channel_layout_nb_channels(channel_layout: cubeb_channel_layout) -> c_uint30 pub fn cubeb_channel_layout_nb_channels(channel_layout: cubeb_channel_layout) -> c_uint; 31 } 32