]> git.ozlabs.org Git - ccan/blobdiff - ccan/ogg_to_pcm/ogg_to_pcm.h
Module from smcameron@yahoo.com:
[ccan] / ccan / ogg_to_pcm / ogg_to_pcm.h
diff --git a/ccan/ogg_to_pcm/ogg_to_pcm.h b/ccan/ogg_to_pcm/ogg_to_pcm.h
new file mode 100644 (file)
index 0000000..6c1b4a2
--- /dev/null
@@ -0,0 +1,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 <msmith@xiph.org>
+ *
+ */
+
+/*
+ *
+ * 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