Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
stenzek
GitHub Repository: stenzek/duckstation
Path: blob/master/dep/cubeb/src/cubeb_mixer.h
4246 views
1
/*
2
* Copyright © 2016 Mozilla Foundation
3
*
4
* This program is made available under an ISC-style license. See the
5
* accompanying file LICENSE for details.
6
*/
7
8
#ifndef CUBEB_MIXER
9
#define CUBEB_MIXER
10
11
#include "cubeb/cubeb.h" // for cubeb_channel_layout and cubeb_stream_params.
12
13
#if defined(__cplusplus)
14
extern "C" {
15
#endif
16
17
typedef struct cubeb_mixer cubeb_mixer;
18
cubeb_mixer *
19
cubeb_mixer_create(cubeb_sample_format format, uint32_t in_channels,
20
cubeb_channel_layout in_layout, uint32_t out_channels,
21
cubeb_channel_layout out_layout);
22
void
23
cubeb_mixer_destroy(cubeb_mixer * mixer);
24
int
25
cubeb_mixer_mix(cubeb_mixer * mixer, size_t frames, const void * input_buffer,
26
size_t input_buffer_size, void * output_buffer,
27
size_t output_buffer_size);
28
29
unsigned int
30
cubeb_channel_layout_nb_channels(cubeb_channel_layout channel_layout);
31
32
#if defined(__cplusplus)
33
}
34
#endif
35
36
#endif // CUBEB_MIXER
37
38