Module Audio.Ringbuffer

module Ringbuffer: sig .. end

Circular ringbuffers.


type t 

A ringbuffer.

val create : int -> int -> t

Create a ringbuffer of given number of channels and size (in samples).

val channels : t -> int
val read_space : t -> int
val write_space : t -> int
val read_advance : t -> int -> unit
val write_advance : t -> int -> unit
val peek : t -> Audio.buffer -> int -> int -> unit
val read : t -> Audio.buffer -> int -> int -> unit
val write : t -> Audio.buffer -> int -> int -> unit
val transmit : t -> (Audio.buffer -> int -> int -> int) -> int