tomato-testing/tests/test_vorbis.c
Green Sky 3cd551098b Squashed 'external/stb/stb/' content from commit c39c7023e
git-subtree-dir: external/stb/stb
git-subtree-split: c39c7023ebb833ce099750fe35509aca5662695e
2023-08-01 20:11:22 +02:00

19 lines
458 B
C

#define STB_VORBIS_HEADER_ONLY
#include "stb_vorbis.c"
#include "stb.h"
extern void stb_vorbis_dumpmem(void);
#ifdef VORBIS_TEST
int main(int argc, char **argv)
{
size_t memlen;
unsigned char *mem = stb_fileu("c:/x/sketch008.ogg", &memlen);
int chan, samplerate;
short *output;
int samples = stb_vorbis_decode_memory(mem, memlen, &chan, &samplerate, &output);
stb_filewrite("c:/x/sketch008.raw", output, samples*4);
return 0;
}
#endif