blob: 1fd764d7ea7cc81d9763d31b0f8cd2d7a9e412d6 (
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
|
#ifndef foosamplehfoo
#define foosamplehfoo
#include <inttypes.h>
#include <sys/types.h>
enum pa_sample_format {
PA_SAMPLE_U8,
PA_SAMPLE_ALAW,
PA_SAMPLE_ULAW,
PA_SAMPLE_S16LE,
PA_SAMPLE_S16BE,
PA_SAMPLE_FLOAT32,
PA_SAMPLE_MAX
};
#ifdef WORDS_BIGENDIAN
#define PA_SAMPLE_S16NE PA_SAMPLE_S16BE
#else
#define PA_SAMPLE_S16NE PA_SAMPLE_S16LE
#endif
struct pa_sample_spec {
enum pa_sample_format format;
uint32_t rate;
uint8_t channels;
};
size_t pa_bytes_per_second(const struct pa_sample_spec *spec);
size_t pa_sample_size(const struct pa_sample_spec *spec);
uint32_t pa_samples_usec(size_t length, const struct pa_sample_spec *spec);
int pa_sample_spec_valid(const struct pa_sample_spec *spec);
#endif
|