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