1 /* Copyright (C) 2010 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
4 * \file spx.h Structures and prototypes common to the speex audio format
5 * handler and the speex decoder.
9 * Information extracted from the first ogg packet.
11 * It contains tech data but not the content of the attached comment tags.
13 struct spx_header_info {
14 /** Holds the state of the decoder. */
16 /** Extracted from header. */
18 /** Current sample rate in Hz. */
19 spx_int32_t sample_rate;
20 /** Current bitrate used by the decoder. */
22 /** Number of frames per packet, extracted from header. */
24 /** The number of channels of the current stream. */
26 /** Only needed for stereo streams. */
27 SpeexStereoState stereo;
28 /** Must be skipped during decode. */
30 /** Narrow/wide/ultrawide band, bitstream version. */
31 const SpeexMode *mode;
34 int spx_process_header(unsigned char *packet, long bytes,
35 struct spx_header_info *shi);