afh: Initialize audio format handlers only once.
[paraslash.git] / opus_common.h
1 /** Various bits stored in the header of an opus stream. */
2 struct opus_header {
3         /** lower 4 bits of the version byte, must be 0. */
4         int version;
5         /** 1..255 */
6         int channels;
7         /** Number of bytes to skip from the beginning. */
8         int preskip;
9         /** Sample rate of the input stream, used by the audio format handler. */
10         ogg_uint32_t input_sample_rate;
11         /** In dB, should be zero whenever possible. */
12         int gain;
13         /** Number of logical streams (usually 1). */
14         int nb_streams;
15         /** Number of streams to decode as 2 channel streams. */
16         int nb_coupled;
17         /** Mapping from coded channels to output channels. */
18         unsigned char stream_map[255];
19 };
20
21 int opus_parse_header(const char *packet, int len, struct opus_header *h);