package ocamlsdl2

  1. Overview
  2. Docs
type t = Sdlaudio.t
type format = Sdlaudio.format =
  1. | AUDIO_U8
  2. | AUDIO_S8
  3. | AUDIO_U16LSB
  4. | AUDIO_S16LSB
  5. | AUDIO_U16MSB
  6. | AUDIO_S16MSB
  7. | AUDIO_U16
  8. | AUDIO_S16
  9. | AUDIO_S32LSB
  10. | AUDIO_S32MSB
  11. | AUDIO_S32
  12. | AUDIO_F32LSB
  13. | AUDIO_F32MSB
  14. | AUDIO_F32
  15. | AUDIO_U16SYS
  16. | AUDIO_S16SYS
  17. | AUDIO_S32SYS
  18. | AUDIO_F32SYS
val get_drivers : unit -> string array
val init : driver_name:string -> unit
val quit : unit -> unit
val get_current_driver : unit -> string
type status = Sdlaudio.status =
  1. | Stopped
  2. | Playing
  3. | Paused
val get_status : unit -> status
val string_of_status : status -> string
val pause : pause_on:bool -> unit
val lock : unit -> unit
val unlock : unit -> unit
val close : unit -> unit
type audio_spec = Sdlaudio.audio_spec
val new_audio_spec : unit -> audio_spec
val free_audio_spec : audio_spec -> unit
type audio_buffer = Sdlaudio.audio_buffer
val load_wav : filename:string -> spec:audio_spec -> audio_buffer * int32
val free_wav : audio_buffer -> unit
type audio_device_id = Sdlaudio.audio_device_id
val open_audio_device_simple : audio_spec -> audio_device_id
val queue_audio : audio_device_id -> audio_buffer -> int32 -> unit
val unpause_audio_device : audio_device_id -> unit
val pause_audio_device : audio_device_id -> unit
val close_audio_device : audio_device_id -> unit
OCaml

Innovation. Community. Security.