base64: Use para_isspace() everywhere.
[paraslash.git] / spx.h
1 /*
2 * Copyright (C) 2010 Andre Noll <maan@tuebingen.mpg.de>
3 *
4 * Licensed under the GPL v2. For licencing details see COPYING.
5 */
6
7 /**
8 * \file spx.h Structures and prototypes common to the speex audio format
9 * handler and the speex decoder.
10 */
11
12 /**
13 * Information extracted from the first ogg packet.
14 *
15 * It contains tech data but not the content of the attached comment tags.
16 */
17 struct spx_header_info {
18 /** Holds the state of the decoder. */
19 void *state;
20 /** Extracted from header. */
21 int frame_size;
22 /** Current sample rate in Hz. */
23 spx_int32_t sample_rate;
24 /** Current bitrate used by the decoder. */
25 int bitrate;
26 /** Number of frames per packet, extracted from header. */
27 int nframes;
28 /** The number of channels of the current stream. */
29 int channels;
30 /** Only needed for stereo streams. */
31 SpeexStereoState stereo;
32 /** Must be skipped during decode. */
33 int extra_headers;
34 /** Narrow/wide/ultrawide band, bitstream version. */
35 const SpeexMode *mode;
36 };
37
38 int spx_process_header(unsigned char *packet, long bytes,
39 struct spx_header_info *shi);