sig
exception SDLcdrom_exception of string
exception Trayempty
type cdrom_drive
type cdrom_drive_status =
CD_TRAYEMPTY
| CD_STOPPED
| CD_PLAYING
| CD_PAUSED
type track_type = TRACK_AUDIO | TRACK_DATA
type track = {
id : int;
kind : Sdlcdrom.track_type;
length : int;
offset : int;
}
type cdrom_info = {
num_tracks : int;
curr_track : int;
curr_frame : int;
tracks : Sdlcdrom.track array;
}
external get_num_drives : unit -> int = "sdlcdrom_get_num_drives"
external drive_name : int -> string = "sdlcdrom_drive_name"
external cd_open : int -> Sdlcdrom.cdrom_drive = "sdlcdrom_open"
external cd_close : Sdlcdrom.cdrom_drive -> unit = "sdlcdrom_close"
external cd_status : Sdlcdrom.cdrom_drive -> Sdlcdrom.cdrom_drive_status
= "sdlcdrom_status"
external cd_info : Sdlcdrom.cdrom_drive -> Sdlcdrom.cdrom_info
= "sdlcdrom_info"
val msf_of_frames : int -> int * int * int
val frames_of_msf : int * int * int -> int
external cd_play_tracks :
Sdlcdrom.cdrom_drive ->
start_track:int ->
start_frame:int -> num_tracks:int -> num_frames:int -> unit
= "sdlcdrom_play_tracks"
val cd_play_track : Sdlcdrom.cdrom_drive -> Sdlcdrom.track -> unit
external cd_pause : Sdlcdrom.cdrom_drive -> unit = "sdlcdrom_pause"
external cd_resume : Sdlcdrom.cdrom_drive -> unit = "sdlcdrom_resume"
external cd_stop : Sdlcdrom.cdrom_drive -> unit = "sdlcdrom_stop"
external cd_eject : Sdlcdrom.cdrom_drive -> unit = "sdlcdrom_eject"
end