stb-vorbis.monkey2 667 B

12345678910111213141516171819202122
  1. #import "<libc>"
  2. #import "native/stb-vorbis.c"
  3. #import "native/stb-vorbis.h"
  4. Namespace stb.vorbis
  5. Extern
  6. #rem
  7. extern int stb_vorbis_decode_memory(const unsigned char *mem, int len, int *channels, int *sample_rate, short **output);
  8. // decode an entire file and output the data interleaved into a malloc()ed
  9. // buffer stored in *output. The return value is the number of samples
  10. // decoded, or -1 if the file could not be opened or was not an ogg vorbis file.
  11. // When you're done with it, just free() the pointer returned in *output.
  12. #end
  13. Function stb_vorbis_decode_memory:Int( mem:UByte Ptr,len:Int,channels:Int Ptr,sample_rate:Int Ptr,output:Short Ptr Ptr )