sig
exception SDLmixer_exception of string
external version : unit -> Sdl.version = "sdlmixer_version"
type format =
AUDIO_FORMAT_U8
| AUDIO_FORMAT_S8
| AUDIO_FORMAT_U16LSB
| AUDIO_FORMAT_S16LSB
| AUDIO_FORMAT_U16MSB
| AUDIO_FORMAT_S16MSB
| AUDIO_FORMAT_U16SYS
| AUDIO_FORMAT_S16SYS
type channels = MONO | STEREO
val open_audio :
?freq:int ->
?format:Sdlmixer.format ->
?chunksize:int -> ?channels:Sdlmixer.channels -> unit -> unit
val close_audio : unit -> unit
type specs = {
frequency : int;
format : Sdlmixer.format;
channels : Sdlmixer.channels;
}
val query_specs : unit -> Sdlmixer.specs
type chunk
external loadWAV : string -> Sdlmixer.chunk = "sdlmixer_loadWAV"
val loadWAV_from_mem : string -> Sdlmixer.chunk
external load_string : string -> Sdlmixer.chunk = "sdlmixer_load_string"
external volume_chunk : Sdlmixer.chunk -> float = "sdlmixer_volume_chunk"
external setvolume_chunk : Sdlmixer.chunk -> float -> unit
= "sdlmixer_setvolume_chunk"
external free_chunk : Sdlmixer.chunk -> unit = "sdlmixer_free_chunk"
type channel = int
val all_channels : Sdlmixer.channel
val num_channels : unit -> int
external allocate_channels : int -> int = "sdlmixer_allocate_channels"
external play_channel :
?channel:Sdlmixer.channel ->
?loops:int -> ?ticks:float -> Sdlmixer.chunk -> unit
= "sdlmixer_play_channel_timed"
val play_sound : Sdlmixer.chunk -> unit
external fadein_channel :
?channel:Sdlmixer.channel ->
?loops:int -> ?ticks:float -> Sdlmixer.chunk -> float -> unit
= "sdlmixer_fadein_channel"
external volume_channel : Sdlmixer.channel -> float
= "sdlmixer_volume_channel"
external setvolume_channel : Sdlmixer.channel -> float -> unit
= "sdlmixer_setvolume_channel"
external pause_channel : Sdlmixer.channel -> unit
= "sdlmixer_pause_channel"
external resume_channel : Sdlmixer.channel -> unit
= "sdlmixer_resume_channel"
external halt_channel : Sdlmixer.channel -> unit = "sdlmixer_halt_channel"
external expire_channel : Sdlmixer.channel -> float option -> unit
= "sdlmixer_expire_channel"
external fadeout_channel : Sdlmixer.channel -> float -> unit
= "sdlmixer_fadeout_channel"
external playing_channel : Sdlmixer.channel -> bool = "sdlmixer_playing"
external num_playing_channel : unit -> int = "sdlmixer_numplaying"
external paused_channel : Sdlmixer.channel -> bool
= "sdlmixer_paused_channel"
external num_paused_channel : unit -> int = "sdlmixer_numpaused_channel"
type fade_status = NO_FADING | FADING_OUT | FADING_IN
external fading_channel : Sdlmixer.channel -> Sdlmixer.fade_status
= "sdlmixer_fading_channel"
type group = int
val default_group : Sdlmixer.group
external reserve_channels : int -> int = "sdlmixer_reserve_channels"
external group_channel : Sdlmixer.channel -> Sdlmixer.group -> unit
= "sdlmixer_group_channel"
external group_channels :
from_c:Sdlmixer.channel ->
to_c:Sdlmixer.channel -> Sdlmixer.group -> unit
= "sdlmixer_group_channel"
external group_count : Sdlmixer.group -> int = "sdlmixer_group_count"
external group_available : Sdlmixer.group -> Sdlmixer.channel
= "sdlmixer_group_available"
external group_oldest : Sdlmixer.group -> Sdlmixer.channel
= "sdlmixer_group_oldest"
external group_newer : Sdlmixer.group -> Sdlmixer.channel
= "sdlmixer_group_newer"
external fadeout_group : Sdlmixer.group -> float -> unit
= "sdlmixer_fadeout_group"
external halt_group : Sdlmixer.group -> unit = "sdlmixer_halt_group"
type music
type music_kind = NONE | CMD | WAV | MOD | MID | OGG | MP3
external load_music : string -> Sdlmixer.music = "sdlmixer_loadMUS"
external free_music : Sdlmixer.music -> unit = "sdlmixer_free_music"
external play_music : ?loops:int -> Sdlmixer.music -> unit
= "sdlmixer_play_music"
external fadein_music : ?loops:int -> Sdlmixer.music -> float -> unit
= "sdlmixer_fadein_music"
external volume_music : Sdlmixer.music -> float = "sdlmixer_volume_music"
external setvolume_music : Sdlmixer.music -> float -> unit
= "sdlmixer_setvolume_music"
external pause_music : unit -> unit = "sdlmixer_pause_music"
external resume_music : unit -> unit = "sdlmixer_resume_music"
external rewind_music : unit -> unit = "sdlmixer_rewind_music"
external set_music_cmd : string -> unit = "sdlmixer_set_music_cmd"
external unset_music_cmd : unit -> unit = "sdlmixer_unset_music_cmd"
external halt_music : unit -> unit = "sdlmixer_halt_music"
external fadeout_music : float -> unit = "sdlmixer_fadeout_music"
external music_type : Sdlmixer.music option -> Sdlmixer.music_kind
= "sdlmixer_get_music_type"
external playing_music : unit -> bool = "sdlmixer_playing_music"
external paused_music : unit -> bool = "sdlmixer_paused_music"
external fading_music : unit -> Sdlmixer.fade_status
= "sdlmixer_fading_music"
end