package bjack

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Ocaml blocking API to jack audio connection kit

Types and exceptions

type t

Type for a Bjack device

type converter =
  1. | Best_quality
  2. | Medium_quality
  3. | Fastest
  4. | Zero_order_hold
  5. | Linear

Various possible samplerate converters

exception Open
exception Bytes_per_output_frame_invalid
exception Bytes_per_input_frame_invalid
exception Too_many_output_channels
exception Port_name_output_channel_mismatch
exception Port_not_found
exception Too_many_input_channels
exception Port_name_input_channel_mismatch
val set_conversion_function : converter -> unit

Set conversion function

type port_flag =
  1. | Input
  2. | Output
  3. | Physical
  4. | Monitor
  5. | Terminal

Various jack port options

Blocking API

val open_t : ?ringbuffer_size:int -> ?server_name:string -> rate:int -> bits_per_sample:int -> input_channels:int -> output_channels:int -> flags:port_flag list -> client_name:string -> unit -> t

Open a Bjack device

val close : t -> unit

Close a Bjack device

val write : t -> string -> int

Write to a device. * Raises Too_many_output_channels if there are no output channels available on the device

val read : t -> int -> string

Read from a device. * Raises Too_many_input_channels if there are no input channels available on the device

val reset : t -> unit

Reset a Bjack device

Parameters and informations

type position_unit =
  1. | Bytes
  2. | Milliseconds
type position_type =
  1. | Played
  2. | Written_to_jack
  3. | Written
val get_position : position_unit:position_unit -> position_type:position_type -> t -> int
val set_position : position_unit:position_unit -> t -> int -> unit
val get_output_latency : t -> int
val get_input_latency : t -> int
type playing_state =
  1. | Playing
  2. | Paused
  3. | Stopped
  4. | Closed
  5. | Reset
val set_state : t -> playing_state -> unit
val get_state : t -> playing_state
val get_max_output_buffered_bytes : t -> int
val get_max_input_buffered_bytes : t -> int
val get_jack_buffered_bytes : t -> int
type volume =
  1. | Linear
  2. | Decibel
val set_volume_effect_type : t -> volume -> volume
val set_all_volume : t -> int -> unit
val set_channel_volume : channel:int -> device:t -> int -> unit
val get_channel_volume : t -> int -> int
val get_output_bytes_per_second : t -> int
val get_input_bytes_per_second : t -> int
val get_bytes_stored : t -> int
val get_bytes_free_space : t -> int
val get_bytes_used_space : t -> int
val get_bytes_per_output_frame : t -> int
val get_bytes_per_input_frame : t -> int
val get_num_output_channels : t -> int
val get_num_input_channels : t -> int
val get_sample_rate : t -> int