cubeb_sys/
mixer.rs

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
6use channel::cubeb_channel_layout;
7use format::cubeb_sample_format;
8use std::os::raw::{c_int, c_uint, c_void};
9
10pub enum cubeb_mixer {}
11
12extern "C" {
13    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;
20    pub fn cubeb_mixer_destroy(mixer: *mut cubeb_mixer);
21    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
30    pub fn cubeb_channel_layout_nb_channels(channel_layout: cubeb_channel_layout) -> c_uint;
31}