forked from smcameron/wordwarvi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ogg_to_pcm.h
38 lines (34 loc) · 1.02 KB
/
ogg_to_pcm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef __OGG_TO_PCM_H__
#define __OGG_TO_PCM_H__
#ifdef DEFINE_OGG_TO_PCM_GLOBALS
#define GLOBAL
#else
#define GLOBAL extern
#endif
/* OggDec
*
* This program is distributed under the GNU General Public License, version 2.
* A copy of this license is included with this source.
*
* Copyright 2002, Michael Smith <[email protected]>
*
*/
/*
*
* This code was hacked off of the carcass of oggdec.c, from
* the vorbistools-1.2.0 package, and is copyrighted as above,
* with the modifications made by me,
* (c) Copyright Stephen M. Cameron, 2008,
* (and of course also released under the GNU General Public License, version 2.)
*
*/
/* ogg_to_pcm() reads an ogg vorbis audio file, infile, and
* dumps the data into a big buffer, *pcmbuffer (which it
* allocates via malloc) and returns the number of samples
* in *nsamples, and the samplesize in *samplesize. and etc.
*/
GLOBAL int ogg_to_pcm(char *infile, int16_t **pcmbuffer,
int *samplesize, int *sample_rate, int *nchannels,
uint64_t *nsamples);
#undef GLOBAL
#endif