module Shout:sig..end
type shout
exception Insane
exception No_connect
exception No_login
exception Socket
exception Malloc
exception Metadata
exception Connected
exception Unconnected
exception Unsupported
exception Send_error
type data_format =
| |
Format_vorbis |
(* |
ogg / vorbis
| *) |
| |
Format_mp3 |
(* |
mp3
| *) |
type protocol =
| |
Protocol_http |
(* |
http
| *) |
| |
Protocol_xaudiocast |
(* |
audiocast
| *) |
| |
Protocol_icy |
(* |
shoutcast
| *) |
val init : unit -> unitval shutdown : unit -> unitval version : unit -> string * int * int * intval get_error : shout -> stringShout function.val get_errno : shout -> intval new_shout : unit -> shoutshout value.val is_connected : shout -> boolopen_shout. They might raise the Malloc exception or the Connected exception when attempting to change a connection attribute while the connection is open.open_shout. They might raise the Malloc exception or the Connected exception when attempting to change a connection attribute while the connection is open.val set_host : shout -> string -> unitval get_host : shout -> stringval set_port : shout -> int -> unitval get_port : shout -> intval set_user : shout -> string -> unitval get_user : shout -> stringval set_password : shout -> string -> unitval get_password : shout -> stringval set_protocol : shout -> protocol -> unitval get_protocol : shout -> protocolval set_format : shout -> data_format -> unitval get_format : shout -> data_formatval set_mount : shout -> string -> unitProtocol_icy protocol).val get_mount : shout -> stringval set_dumpfile : shout -> string -> unitval get_dumpfile : shout -> stringval set_agent : shout -> string -> unitval get_agent : shout -> stringval set_public : shout -> bool -> unitfalse)?val get_public : shout -> boolval set_name : shout -> string -> unitval get_name : shout -> stringval set_url : shout -> string -> unitval get_url : shout -> stringval set_genre : shout -> string -> unitval get_genre : shout -> stringval set_description : shout -> string -> unitval get_description : shout -> stringval set_audio_info : shout -> string -> string -> unitset_audio_info shout name value sets the stream audio parameter name to the value value.val get_audio_info : shout -> string -> stringval set_multicast_ip : shout -> string -> unitval get_multicast_ip : shout -> stringval open_shout : shout -> unitInsane if host, port or password is unset.Connected if the connection has already been opened.Unsupported if the protocol / format combination is unsupported (e.g. ogg / vobis may only be sent via the http protocol).No_connect if a connection to the server could not be established.Socket if an error occured while talking to the server.No_login if the server refused login (authentication failed).val close : shout -> unitUnconnected if the shout value is not currently connected.val send : shout -> string -> unitUnconnected if the shout value is not currently connected.Socket if an error occured while talking to the server.val send_raw : shout -> string -> intUnconnected if the shout value is not currently connected.Socket if an error occured while talking to the server.val sync : shout -> unitsend (the function delay could also be used to determine the amout of time the caller should wait before sendig data).val delay : shout -> intval set_metadata : shout -> (string * string) array -> unitNo_connect if the server refused the connection attempt.No_login if the server did not accept your authorization credentials.Socket if an error occured talking to the server.Unsupported if the format is not mp3.Metadata if an other error happened (e.g. bad mount point).