build: Rename clean targets.
[paraslash.git] / opus_common.h
1 /*
2  * Copyright (C) 2013 Andre Noll <maan@tuebingen.mpg.de>
3  *
4  * Licensed under the GPL v2. For licencing details see COPYING.
5  */
6
7 /**
8  * \file opus_common.h
9  * Common declarations for the opus decoder and audio format handler.
10  */
11
12 /** Various bits stored in the header of an opus stream. */
13 struct opus_header {
14         /** lower 4 bits of the version byte, must be 0. */
15         int version;
16         /** 1..255 */
17         int channels;
18         /** Number of bytes to skip from the beginning. */
19         uint16_t preskip;
20         /** Sample rate of the input stream, used by the audio format handler. */
21         uint32_t input_sample_rate;
22         /** In dB, should be zero whenever possible. */
23         uint16_t gain;
24         /** Number of logical streams (usually 1). */
25         int nb_streams;
26         /** Number of streams to decode as 2 channel streams. */
27         int nb_coupled;
28         /** Mapping from coded channels to output channels. */
29         unsigned char stream_map[255];
30 };
31
32 int opus_parse_header(const char *packet, int len, struct opus_header *h);