diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /thirdparty/stb/tests/test_vorbis.c | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'thirdparty/stb/tests/test_vorbis.c')
| -rw-r--r-- | thirdparty/stb/tests/test_vorbis.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/thirdparty/stb/tests/test_vorbis.c b/thirdparty/stb/tests/test_vorbis.c new file mode 100644 index 0000000..341a102 --- /dev/null +++ b/thirdparty/stb/tests/test_vorbis.c @@ -0,0 +1,22 @@ +#define STB_IMAGE_STATIC +#define STB_IMAGE_IMPLEMENTATION +#include "stb_image.h" + +#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 |