/usr/lib/ocaml/pulseaudio/pulseaudio.mli is in libpulse-ocaml-dev 0.1.2-1build5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | (** An error occured. *)
exception Error of int
(** Get the description of an error. *)
val string_of_error : int -> string
type sample_format =
| Sample_format_s16le
| Sample_format_s16be
| Sample_format_float32le
| Sample_format_float32be
type sample =
{
sample_format : sample_format;
sample_rate : int;
sample_chans : int;
}
type map
(** Direction of the stream. *)
type dir =
| Dir_nodirection (** Invalid direction. *)
| Dir_playback (** Playback stream. *)
| Dir_record (** Record stream. *)
| Dir_upload (** Sample upload stream. *)
(** Attributes of the buffer. *)
type buffer_attr =
{
max_length : int; (** Maximum length of the buffer. *)
target_length : int; (** Target length of the buffer (playback only). *)
prebuffering : int; (** Pre-buffering (playback only). *)
min_request : int; (** Minimum request (playback only). *)
fragment_size : int; (** Fragment size (recording only). *)
}
(** Simple pulseaudio interface. *)
module Simple : sig
(** Connections to a server. *)
type t
val create : ?server:string -> client_name:string -> dir:dir -> ?dev:string -> stream_name:string -> sample:sample -> ?map:map -> ?attr:buffer_attr -> unit -> t
(** Close and free a connection to a server. *)
val free : t -> unit
val read : t -> float array array -> int -> int -> unit
val write : t -> float array array -> int -> int -> unit
(** Wait until all data already written is played by the daemon. *)
val drain : t -> unit
(** Flush the playback buffer. *)
val flush : t -> unit
(** Return the playback latency. *)
val latency : t -> int
end
|