module Ao:sig..end
OCaml interface to the ao library.
type t
Device type.
typedriver_kind_t =[ `FILE | `LIVE | `UNKNOWN ]
Which kind of driver?
typebyte_format_t =[ `BIG_ENDIAN | `LITTLE_ENDIAN | `NATIVE | `UNKNOWN ]
Byte format specifier.
type driver_t = private {
|
id : |
|
kind : |
|
short_name : |
|
name : |
|
comment : |
|
: |
|
priority : |
|
preferred_byte_format : |
|
options : |
Driver type (private).
exception Closed
Raised when trying to play or close a closed device.
exception Invalid_value
Raised when passing an invalid parameter's value.
val get_default_driver : unit -> driver_tGet default driver
val drivers : driver_t listdrivers is a list of available drivers.
val open_live : ?bits:int ->
?rate:int ->
?channels:int ->
?channels_matrix:string ->
?byte_format:byte_format_t ->
?options:(string * string) list -> ?driver:driver_t -> unit -> topen_live.
The channels_matrix parameter is
used only if the module is compiled against
libao >= 1.0.
val open_file : ?bits:int ->
?rate:int ->
?channels:int ->
?channels_matrix:string ->
?byte_format:byte_format_t ->
?options:(string * string) list ->
?driver:driver_t -> ?overwrite:bool -> string -> topen_file.
The channels_matrix parameter is
used only if the module is compiled against
libao >= 1.0.
val find_driver : string -> driver_tfind_driver name returns the driver associated with the given short
name.
val play : t -> string -> unitplay device buf plays the sequence of samples in buf.
val close : t -> unitclose device closes the given device.
Backward compatibility functions, do not use them in new code.
val driver_kind : driver_t -> driver_kind_t
val driver_name : driver_t -> string
val driver_short_name : driver_t -> string
val driver_comment : driver_t -> string
: driver_t -> string
val driver_priority : driver_t -> int
val driver_preferred_byte_format : driver_t -> byte_format_t
val driver_options : driver_t -> string list