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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
#ifndef __ALSA_PCM_RATE_H
#define __ALSA_PCM_RATE_H
#ifdef __cplusplus
extern "C" {
#endif
#define SND_PCM_RATE_PLUGIN_VERSION 0x010002
typedef struct snd_pcm_rate_side_info {
snd_pcm_format_t format;
unsigned int rate;
snd_pcm_uframes_t buffer_size;
snd_pcm_uframes_t period_size;
} snd_pcm_rate_side_info_t;
typedef struct snd_pcm_rate_info {
struct snd_pcm_rate_side_info in;
struct snd_pcm_rate_side_info out;
unsigned int channels;
} snd_pcm_rate_info_t;
typedef struct snd_pcm_rate_ops {
void (*close)(void *obj);
int (*init)(void *obj, snd_pcm_rate_info_t *info);
void (*free)(void *obj);
void (*reset)(void *obj);
int (*adjust_pitch)(void *obj, snd_pcm_rate_info_t *info);
void (*convert)(void *obj,
const snd_pcm_channel_area_t *dst_areas,
snd_pcm_uframes_t dst_offset, unsigned int dst_frames,
const snd_pcm_channel_area_t *src_areas,
snd_pcm_uframes_t src_offset, unsigned int src_frames);
void (*convert_s16)(void *obj, int16_t *dst, unsigned int dst_frames,
const int16_t *src, unsigned int src_frames);
snd_pcm_uframes_t (*input_frames)(void *obj, snd_pcm_uframes_t frames);
snd_pcm_uframes_t (*output_frames)(void *obj, snd_pcm_uframes_t frames);
unsigned int version;
int (*get_supported_rates)(void *obj, unsigned int *rate_min,
unsigned int *rate_max);
void (*dump)(void *obj, snd_output_t *out);
} snd_pcm_rate_ops_t;
typedef int (*snd_pcm_rate_open_func_t)(unsigned int version, void **objp,
snd_pcm_rate_ops_t *opsp);
typedef int (*snd_pcm_rate_open_conf_func_t)(unsigned int version, void **objp,
snd_pcm_rate_ops_t *opsp, const snd_config_t *conf);
#define SND_PCM_RATE_PLUGIN_ENTRY(name) _snd_pcm_rate_##name##_open
#define SND_PCM_RATE_PLUGIN_CONF_ENTRY(name) _snd_pcm_rate_##name##_open_conf
#ifndef DOC_HIDDEN
typedef struct snd_pcm_rate_old_ops {
void (*close)(void *obj);
int (*init)(void *obj, snd_pcm_rate_info_t *info);
void (*free)(void *obj);
void (*reset)(void *obj);
int (*adjust_pitch)(void *obj, snd_pcm_rate_info_t *info);
void (*convert)(void *obj,
const snd_pcm_channel_area_t *dst_areas,
snd_pcm_uframes_t dst_offset, unsigned int dst_frames,
const snd_pcm_channel_area_t *src_areas,
snd_pcm_uframes_t src_offset, unsigned int src_frames);
void (*convert_s16)(void *obj, int16_t *dst, unsigned int dst_frames,
const int16_t *src, unsigned int src_frames);
snd_pcm_uframes_t (*input_frames)(void *obj, snd_pcm_uframes_t frames);
snd_pcm_uframes_t (*output_frames)(void *obj, snd_pcm_uframes_t frames);
} snd_pcm_rate_old_ops_t;
#endif
#ifdef __cplusplus
}
#endif
#endif
|