package portaudio_c_bindings

  1. Overview
  2. Docs
type ('inp_fmt, 'inp_inter, 'out_fmt, 'out_inter) stream
module Flags : sig ... end
module Callback : sig ... end
val open_stream : ?input_params:('a, 'b, 'c) StreamParameters.t -> ?output_params:('d, 'e, 'f) StreamParameters.t -> sample_rate:float -> frames_per_buffer:int -> stream_flags:Flags.t -> ?callback:('a, 'c, 'd, 'f) Callback.t -> unit -> ('a, 'c, 'd, 'f) stream
  • parameter callback

    An optional callback for the stream. Do not save the view values passed into the callback. Copy the data if it's needed outside the callback.

val open_default_stream : num_input_channels:int -> num_output_channels:int -> format:('a, 'b, 'c) SampleFormat.t -> sample_rate:float -> frames_per_buffer:int -> ?callback:('a, 'c, 'a, 'c) Callback.t -> unit -> ('a, 'c, 'a, 'c) stream
  • parameter callback

    An optional callback for the stream. Do not save the view values passed into the callback. Copy the data if it's needed outside the callback.

type stream_info = {
  1. version : int;
  2. input_latency : pa_time;
  3. output_latency : pa_time;
  4. sample_rate : float;
}
val start : ('a, 'b, 'c, 'd) stream -> unit
val stop : ('a, 'b, 'c, 'd) stream -> unit
val close : ('a, 'b, 'c, 'd) stream -> unit
val abort : ('a, 'b, 'c, 'd) stream -> unit
val is_stopped : ('a, 'b, 'c, 'd) stream -> bool
val is_active : ('a, 'b, 'c, 'd) stream -> bool
val get_info : ('a, 'b, 'c, 'd) stream -> stream_info
val time : ('a, 'b, 'c, 'd) stream -> pa_time
val cpu_load : ('a, 'b, 'c, 'd) stream -> float
val read_interleaved : ('a, SampleFormat.interleaved, 'c, 'd) stream -> ('a, SampleFormat.interleaved) View.t -> unit
val read_non_interleaved : ('a, SampleFormat.non_interleaved, 'c, 'd) stream -> ('a, SampleFormat.non_interleaved) View.t array -> unit
val write_interleaved : ('a, 'b, 'c, SampleFormat.interleaved) stream -> ('c, SampleFormat.interleaved) View.t -> unit
val write_non_interleaved : ('a, 'b, 'c, SampleFormat.non_interleaved) stream -> ('c, SampleFormat.non_interleaved) View.t array -> unit
val read_available : ('a, 'b, 'c, 'd) stream -> int
val write_available : ('a, 'b, 'c, 'd) stream -> int
val set_finished_callback : ('a, 'b, 'c, 'd) stream -> (unit -> unit) option -> unit
OCaml

Innovation. Community. Security.