package mm

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

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

Number of channels of the ringbuffr.

val read_space : t -> int

Number of samples available for reading.

val write_space : t -> int

Number of samples available for writing.

val read_advance : t -> int -> unit

Advance the read pointer.

val write_advance : t -> int -> unit

Advance the write pointer.

val peek : t -> buffer -> unit

Fill in a buffer without changing read pointer.

val read : t -> buffer -> unit

Fill in a buffer and advance read pointer.

val write : t -> buffer -> unit

Write a buffer into the ringbuffer.

val transmit : t -> (buffer -> int) -> int