Skip to content
Myr

test_vorbis.c

This file

Path

tests/test_vorbis.c

18 lines · 477 bytes · C

Last changed by

Merge branch 'dev' into workingSean Barrettbefore adoptionc497f72

History of this file

Take it

1#define STB_VORBIS_HEADER_ONLY2#include "stb_vorbis.c"3#include "stb.h"45extern void stb_vorbis_dumpmem(void);67#ifdef VORBIS_TEST8int main(int argc, char **argv)9{10   size_t memlen;11   unsigned char *mem = stb_fileu("../../lib/vorbis/sample/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