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 -> unit
val shutdown : unit -> unit
val version : unit -> string * int * int * int
val get_error : shout -> string
Shout
function.val get_errno : shout -> int
val new_shout : unit -> shout
shout
value.val is_connected : shout -> bool
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 -> unit
val get_host : shout -> string
val set_port : shout -> int -> unit
val get_port : shout -> int
val set_user : shout -> string -> unit
val get_user : shout -> string
val set_password : shout -> string -> unit
val get_password : shout -> string
val set_protocol : shout -> protocol -> unit
val get_protocol : shout -> protocol
val set_format : shout -> data_format -> unit
val get_format : shout -> data_format
val set_mount : shout -> string -> unit
Protocol_icy
protocol).val get_mount : shout -> string
val set_dumpfile : shout -> string -> unit
val get_dumpfile : shout -> string
val set_agent : shout -> string -> unit
val get_agent : shout -> string
val set_public : shout -> bool -> unit
false
)?val get_public : shout -> bool
val set_name : shout -> string -> unit
val get_name : shout -> string
val set_url : shout -> string -> unit
val get_url : shout -> string
val set_genre : shout -> string -> unit
val get_genre : shout -> string
val set_description : shout -> string -> unit
val get_description : shout -> string
val set_audio_info : shout -> string -> string -> unit
set_audio_info shout name value
sets the stream audio parameter name
to the value value
.val get_audio_info : shout -> string -> string
val set_multicast_ip : shout -> string -> unit
val get_multicast_ip : shout -> string
val open_shout : shout -> unit
Insane
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 -> unit
Unconnected
if the shout
value is not currently connected.val send : shout -> string -> unit
Unconnected
if the shout
value is not currently connected.Socket
if an error occured while talking to the server.val send_raw : shout -> string -> int
Unconnected
if the shout
value is not currently connected.Socket
if an error occured while talking to the server.val sync : shout -> unit
send
(the function delay
could also be used to determine the amout of time the caller should wait before sendig data).val delay : shout -> int
val set_metadata : shout -> (string * string) array -> unit
No_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).