sig
exception Error of int
exception Unanticipated_host_error
val string_of_error : int -> string
val get_last_host_error : unit -> int * string
val get_version : unit -> int
val get_version_string : unit -> string
val init : unit -> unit
val terminate : unit -> unit
type host_api_info = {
h_struct_version : int;
h_host_api_type : int;
h_name : string;
h_device_count : int;
h_default_input_device : int;
h_default_output_device : int;
}
val get_host_api_count : unit -> int
val get_default_host_api : unit -> int
val get_host_api_info : int -> Portaudio.host_api_info
type device_info = {
d_struct_version : int;
d_name : string;
d_host_api : int;
d_max_input_channels : int;
d_max_output_channels : int;
d_default_low_input_latency : float;
d_default_low_output_latency : float;
d_default_high_input_latency : float;
d_default_high_output_latency : float;
d_default_sample_rate : float;
}
val get_default_input_device : unit -> int
val get_default_output_device : unit -> int
val get_device_count : unit -> int
val get_device_info : int -> Portaudio.device_info
type ('a, 'b) sample_format
val format_int8 : (int, Bigarray.int8_signed_elt) Portaudio.sample_format
val format_int16 : (int, Bigarray.int16_signed_elt) Portaudio.sample_format
val format_int24 : (int32, Bigarray.int32_elt) Portaudio.sample_format
val format_int32 : (int32, Bigarray.int32_elt) Portaudio.sample_format
val format_float32 : (float, Bigarray.float32_elt) Portaudio.sample_format
type ('a, 'b) stream_parameters = {
channels : int;
device : int;
sample_format : ('a, 'b) Portaudio.sample_format;
latency : float;
}
type stream_flag
type ('a, 'b, 'c, 'd) stream
type ('a, 'b, 'c, 'd) callback =
('a, 'b, Bigarray.c_layout) Bigarray.Genarray.t ->
('c, 'd, Bigarray.c_layout) Bigarray.Genarray.t -> int -> int
val open_stream :
('a, 'b) Portaudio.stream_parameters option ->
('c, 'd) Portaudio.stream_parameters option ->
?interleaved:bool ->
float ->
int ->
?callback:('a, 'b, 'c, 'd) Portaudio.callback ->
Portaudio.stream_flag list -> ('a, 'b, 'c, 'd) Portaudio.stream
val open_default_stream :
?callback:('a, 'b, 'a, 'b) Portaudio.callback ->
?format:('a, 'b) Portaudio.sample_format ->
?interleaved:bool ->
int -> int -> int -> int -> ('a, 'b, 'a, 'b) Portaudio.stream
val close_stream : ('a, 'b, 'c, 'd) Portaudio.stream -> unit
val start_stream : ('a, 'b, 'c, 'd) Portaudio.stream -> unit
val stop_stream : ('a, 'b, 'c, 'd) Portaudio.stream -> unit
val abort_stream : ('a, 'b, 'c, 'd) Portaudio.stream -> unit
val sleep : int -> unit
val write_stream :
('a, 'b, 'c, 'd) Portaudio.stream -> 'c array array -> int -> int -> unit
val read_stream :
('a, 'b, 'c, 'd) Portaudio.stream -> 'a array array -> int -> int -> unit
val write_stream_ba :
('a, 'b, 'c, 'd) Portaudio.stream ->
('c, 'd, Bigarray.c_layout) Bigarray.Genarray.t -> int -> int -> unit
val read_stream_ba :
('a, 'b, 'c, 'd) Portaudio.stream ->
('a, 'b, Bigarray.c_layout) Bigarray.Genarray.t -> int -> int -> unit
end