mirror of
https://github.com/nothings/stb
synced 2024-12-17 05:12:35 +03:00
a0b521fcf2
compiling all test cases and compilers in test.sbm Compilers: 32-bit: VS2015 VS2013 VS2008 VC6 (1998) clang-cl 9.0.1 64-bit VS2015 clang-cl 9.0.1
19 lines
458 B
C
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
|