]> git.ozlabs.org Git - ccan/blob - ccan/ogg_to_pcm/ogg_to_pcm.h
tdb2: TDB_ATTRIBUTE_STATS access via tdb_get_attribute.
[ccan] / ccan / ogg_to_pcm / ogg_to_pcm.h
1 #ifndef __OGG_TO_PCM_H__
2 #define __OGG_TO_PCM_H__
3 #include <stdint.h>
4 #ifdef DEFINE_OGG_TO_PCM_GLOBALS
5 #define GLOBAL
6 #else
7 #define GLOBAL extern
8 #endif
9
10 /* OggDec
11  *
12  * This program is distributed under the GNU General Public License, version 2.
13  * A copy of this license is included with this source.
14  *
15  * Copyright 2002, Michael Smith <msmith@xiph.org>
16  *
17  */
18
19 /*
20  *
21  * This code was hacked off of the carcass of oggdec.c, from
22  * the vorbistools-1.2.0 package, and is copyrighted as above,
23  * with the modifications made by me,
24  * (c) Copyright Stephen M. Cameron, 2008,
25  * (and of course also released under the GNU General Public License, version 2.)
26  *
27  */
28
29 /* ogg_to_pcm() reads an ogg vorbis audio file, infile, and
30  * dumps the data into a big buffer, *pcmbuffer (which it
31  * allocates via malloc) and returns the number of samples
32  * in *nsamples, and the samplesize in *samplesize. and etc.
33  */
34 GLOBAL int ogg_to_pcm(char *infile, int16_t **pcmbuffer,
35         int *samplesize, int *sample_rate, int *nchannels,
36         uint64_t *nsamples);
37
38 #undef GLOBAL
39 #endif