Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
540 B

  1. #define STB_IMAGE_STATIC
  2. #define STB_IMAGE_IMPLEMENTATION
  3. #include "stb_image.h"
  4. #define STB_VORBIS_HEADER_ONLY
  5. #include "stb_vorbis.c"
  6. #include "stb.h"
  7. extern void stb_vorbis_dumpmem(void);
  8. #ifdef VORBIS_TEST
  9. int main(int argc, char **argv)
  10. {
  11. size_t memlen;
  12. unsigned char *mem = stb_fileu("c:/x/sketch008.ogg", &memlen);
  13. int chan, samplerate;
  14. short *output;
  15. int samples = stb_vorbis_decode_memory(mem, memlen, &chan, &samplerate, &output);
  16. stb_filewrite("c:/x/sketch008.raw", output, samples*4);
  17. return 0;
  18. }
  19. #endif