sig
val get_version : unit -> string
exception Buffer_xrun
exception Bad_state
exception Suspended
exception IO_error
exception Device_busy
exception Invalid_argument
exception Device_removed
exception Interrupted
exception Unknown_error of int
type direction = Dir_down | Dir_eq | Dir_up
val string_of_error : exn -> string
val no_stderr_report : unit -> unit
module Pcm :
sig
type handle
type params
type stream = Playback | Capture
type mode = Async | Non_blocking
val open_pcm :
string ->
Alsa.Pcm.stream list -> Alsa.Pcm.mode list -> Alsa.Pcm.handle
val close : Alsa.Pcm.handle -> unit
val prepare : Alsa.Pcm.handle -> unit
val resume : Alsa.Pcm.handle -> unit
val recover : ?verbose:bool -> Alsa.Pcm.handle -> exn -> unit
val start : Alsa.Pcm.handle -> unit
val drain : Alsa.Pcm.handle -> unit
val drop : Alsa.Pcm.handle -> unit
val pause : Alsa.Pcm.handle -> bool -> unit
val reset : Alsa.Pcm.handle -> unit
val wait : Alsa.Pcm.handle -> int -> bool
val readi : Alsa.Pcm.handle -> string -> int -> int -> int
val writei : Alsa.Pcm.handle -> string -> int -> int -> int
val readn : Alsa.Pcm.handle -> string array -> int -> int -> int
val writen : Alsa.Pcm.handle -> string array -> int -> int -> int
val readn_float :
Alsa.Pcm.handle -> float array array -> int -> int -> int
val writen_float :
Alsa.Pcm.handle -> float array array -> int -> int -> int
val readn_float64 :
Alsa.Pcm.handle -> float array array -> int -> int -> int
val writen_float64 :
Alsa.Pcm.handle -> float array array -> int -> int -> int
val get_delay : Alsa.Pcm.handle -> int
type state =
St_open
| St_setup
| St_prepared
| St_running
| St_xrun
| St_draining
| St_paused
| St_suspended
| St_disconnected
val get_state : Alsa.Pcm.handle -> Alsa.Pcm.state
val get_params : Alsa.Pcm.handle -> Alsa.Pcm.params
val set_params : Alsa.Pcm.handle -> Alsa.Pcm.params -> unit
type access = Access_rw_interleaved | Access_rw_noninterleaved
val set_access :
Alsa.Pcm.handle -> Alsa.Pcm.params -> Alsa.Pcm.access -> unit
type fmt =
Format_s16_le
| Format_s24_3le
| Format_float
| Format_float64
val set_format :
Alsa.Pcm.handle -> Alsa.Pcm.params -> Alsa.Pcm.fmt -> unit
val set_rate_near :
Alsa.Pcm.handle -> Alsa.Pcm.params -> int -> Alsa.direction -> int
val set_channels : Alsa.Pcm.handle -> Alsa.Pcm.params -> int -> unit
val set_periods :
Alsa.Pcm.handle -> Alsa.Pcm.params -> int -> Alsa.direction -> unit
val get_periods_min : Alsa.Pcm.params -> int * Alsa.direction
val get_periods_max : Alsa.Pcm.params -> int * Alsa.direction
val set_buffer_size : Alsa.Pcm.handle -> Alsa.Pcm.params -> int -> unit
val set_buffer_size_near :
Alsa.Pcm.handle -> Alsa.Pcm.params -> int -> int
val get_buffer_size_min : Alsa.Pcm.params -> int
val get_buffer_size_max : Alsa.Pcm.params -> int
val set_nonblock : Alsa.Pcm.handle -> bool -> unit
val get_frame_size : Alsa.Pcm.params -> int
end
end