]> code.delx.au - pulseaudio/blob - src/sample.h
main part of the native protocol
[pulseaudio] / src / sample.h
1 #ifndef foosamplehfoo
2 #define foosamplehfoo
3
4 #include <inttypes.h>
5 #include <sys/types.h>
6
7 enum pa_sample_format {
8 SAMPLE_U8,
9 SAMPLE_ALAW,
10 SAMPLE_ULAW,
11 SAMPLE_S16LE,
12 SAMPLE_S16BE,
13 SAMPLE_FLOAT32
14 };
15
16 #define SAMPLE_S16NE SAMPLE_S16LE
17
18 struct pa_sample_spec {
19 enum pa_sample_format format;
20 uint32_t rate;
21 uint8_t channels;
22 };
23
24 size_t pa_bytes_per_second(struct pa_sample_spec *spec);
25 size_t pa_sample_size(struct pa_sample_spec *spec);
26 uint32_t pa_samples_usec(size_t length, struct pa_sample_spec *spec);
27
28 #endif