X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=spx.h;fp=spx.h;h=6ffa80eb17342841295d213ce6b193960160449b;hb=90560de0d7e4d825772270f9ac7cbefbb38aad97;hp=0000000000000000000000000000000000000000;hpb=063328d833daa7e06589645e05d4d2e02f55e911;p=paraslash.git diff --git a/spx.h b/spx.h new file mode 100644 index 00000000..6ffa80eb --- /dev/null +++ b/spx.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2010 Andre Noll + * + * Licensed under the GPL v2. For licencing details see COPYING. + */ + +/** + * \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); +int spx_ctl(void *state, int request, void *ptr);