package bjack

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

Module BjackSource

Ocaml blocking API to jack audio connection kit

Types and exceptions

Sourcetype t

Type for a Bjack device

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

Various possible samplerate converters

Sourceexception Open
Sourceexception Bytes_per_output_frame_invalid
Sourceexception Bytes_per_input_frame_invalid
Sourceexception Too_many_output_channels
Sourceexception Port_name_output_channel_mismatch
Sourceexception Port_not_found
Sourceexception Too_many_input_channels
Sourceexception Port_name_input_channel_mismatch
Sourceval set_conversion_function : converter -> unit

Set conversion function

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

Various jack port options

Blocking API

Sourceval 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

Sourceval close : t -> unit

Close a Bjack device

Sourceval write : t -> string -> int

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

Sourceval read : t -> int -> string

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

Sourceval reset : t -> unit

Reset a Bjack device

Parameters and informations

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

Innovation. Community. Security.