/* 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);