1 #define STB_VORBIS_HEADER_ONLY
2 #include "stb_vorbis.c"
3 #include "stb.h"
4
5 extern void stb_vorbis_dumpmem(void);
6
7 #ifdef VORBIS_TEST
main(int argc,char ** argv)8 int main(int argc, char **argv)
9 {
10 size_t memlen;
11 unsigned char *mem = stb_fileu("c:/x/sketch008.ogg", &memlen);
12 int chan, samplerate;
13 short *output;
14 int samples = stb_vorbis_decode_memory(mem, memlen, &chan, &samplerate, &output);
15 stb_filewrite("c:/x/sketch008.raw", output, samples*4);
16 return 0;
17 }
18 #endif
19