2016-12-04 13:39:35 +00:00
|
|
|
#define STB_IMAGE_STATIC
|
|
|
|
#define STB_IMAGE_IMPLEMENTATION
|
|
|
|
#include "stb_image.h"
|
|
|
|
|
2015-01-21 15:46:54 +00:00
|
|
|
#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;
|
2015-11-09 03:16:25 +00:00
|
|
|
unsigned char *mem = stb_fileu("c:/x/sketch008.ogg", &memlen);
|
2015-01-21 15:46:54 +00:00
|
|
|
int chan, samplerate;
|
|
|
|
short *output;
|
|
|
|
int samples = stb_vorbis_decode_memory(mem, memlen, &chan, &samplerate, &output);
|
2015-11-09 03:16:25 +00:00
|
|
|
stb_filewrite("c:/x/sketch008.raw", output, samples*4);
|
2015-01-21 15:46:54 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|