blob: 800151780c1e837339cb3d35d4a76d407abab65f (
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
|
/* SPDX-License-Identifier: GPL-2.0 */
/**
* \file spx.h Structures and prototypes common to the speex audio format
* handler and the speex decoder.
*/
/**
* Information extracted from the first ogg packet.
*
* It contains tech data but not the content of the attached comment tags.
*/
struct spx_header_info {
/** Holds the state of the decoder. */
void *state;
/** Extracted from header. */
int frame_size;
/** Current sample rate in Hz. */
spx_int32_t sample_rate;
/** Current bitrate used by the decoder. */
int bitrate;
/** Number of frames per packet, extracted from header. */
int nframes;
/** The number of channels of the current stream. */
int channels;
/** Only needed for stereo streams. */
SpeexStereoState stereo;
/** Must be skipped during decode. */
int extra_headers;
/** Narrow/wide/ultrawide band, bitstream version. */
const SpeexMode *mode;
};
int spx_process_header(unsigned char *packet, long bytes,
struct spx_header_info *shi);
|