2 * Copyright (C) 2010-2013 Andre Noll <maan@systemlinux.org>
4 * Licensed under the GPL v2. For licencing details see COPYING.
8 * \file spx.h Structures and prototypes common to the speex audio format
9 * handler and the speex decoder.
13 * Information extracted from the first ogg packet.
15 * It contains tech data but not the content of the attached comment tags.
17 struct spx_header_info
{
18 /** Holds the state of the decoder. */
20 /** Extracted from header. */
22 /** Current sample rate in Hz. */
23 spx_int32_t sample_rate
;
24 /** Current bitrate used by the decoder. */
26 /** Number of frames per packet, extracted from header. */
28 /** The number of channels of the current stream. */
30 /** Only needed for stereo streams. */
31 SpeexStereoState stereo
;
32 /** Must be skipped during decode. */
34 /** Narrow/wide/ultrawide band, bitstream version. */
35 const SpeexMode
*mode
;
38 int spx_process_header(unsigned char *packet
, long bytes
,
39 struct spx_header_info
*shi
);