stb-vorbis.monkey2 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #import "<libc>"
  2. #import "native/stb-vorbis.c"
  3. #import "native/stb-vorbis.h"
  4. Namespace stb.vorbis
  5. Extern
  6. Struct stb_vorbis
  7. End
  8. Struct stb_vorbis_alloc
  9. End
  10. Struct stb_vorbis_info
  11. Field sample_rate:UInt
  12. Field channels:Int
  13. Field setup_memory_required:UInt
  14. Field setup_temp_memory_required:UInt
  15. Field temp_memory_required:UInt
  16. Field max_frame_size:Int
  17. End
  18. Function stb_vorbis_open_filename:stb_vorbis Ptr( filename:CString,error:Int Ptr,alloc_buffer:stb_vorbis_alloc Ptr )
  19. Function stb_vorbis_open_file:stb_vorbis Ptr( f:libc.FILE Ptr,close_handle_on_close:Int,error:Int Ptr,alloc_buffer:stb_vorbis_alloc Ptr )
  20. Function stb_vorbis_close( f:stb_vorbis Ptr )
  21. Function stb_vorbis_get_info:stb_vorbis_info( f:stb_vorbis Ptr )
  22. Function stb_vorbis_stream_length_in_samples:UInt( f:stb_vorbis Ptr )
  23. Function stb_vorbis_stream_length_in_seconds:Float( f:stb_vorbis Ptr )
  24. Function stb_vorbis_get_samples_short_interleaved:Int( f:stb_vorbis Ptr,channels:Int,buffer:Short Ptr,num_shorts:Int )
  25. Function stb_vorbis_get_samples_short:Int( f:stb_vorbis Ptr,channels:Int,buffer:Short Ptr Ptr,num_samples:Int )
  26. Function stb_vorbis_decode_memory:Int( mem:UByte Ptr,len:Int,channels:Int Ptr,sample_rate:Int Ptr,output:Short Ptr Ptr )