blob: 1500ef16ae666eed297867bbdb6d0216d70711e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#ifndef foocommonh
#define foocommonh
#include "sydney.h"
#define elementsof(x) (sizeof(x)/sizeof((x)[0]))
struct sa_device {
sa_mode_t mode;
sa_pcm_format_t pcm_format;
unsigned rate;
unsigned nchannels;
char *codec;
char *client_name;
char *stream_name;
size_t read_lower_watermark;
size_t read_upper_watermark;
size_t write_lower_watermark;
size_t write_upper_watermark;
sa_channel_t *channel_map;
sa_xrun_mode_t xrun_mode;
int ni_enabled;
int dsr_enabled;
sa_event_callback_t event_callback;
char *device;
char *driver;
int input_volume;
int output_volume;
void *user_data;
sa_state_t state;
sa_adjust_t adjust_rate;
sa_adjust_t adjust_nchannels;
sa_adjust_t adjust_pcm_format;
sa_error_t error;
sa_notify_t notify;
sa_event_t event;
};
sa_device_t *device_alloc(size_t total);
void device_free(sa_device_t *d);
int device_alloc_pcm(sa_device_t **dev, size_t total, const char *client_name, sa_mode_t mode, sa_pcm_format_t format, unsigned rate, unsigned channels);
int device_alloc_opaque(sa_device_t **dev, size_t total, const char *client_name, sa_mode_t mode, const char *codec);
#endif
|