package brr

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

Offline audio contexts.

type opts
val opts : channel_count:int -> length:int -> sample_rate_hz:float -> unit -> opts

opts ~channel_count ~length ~sample_rate_ht () are audio context options with the given properties.

type t

The type for OfflineAudioContext objects.

val create : opts -> t

create opts creates an offline audio context with given parameters.

val as_target : t -> Brr.Ev.target

as_target c is c as an event target.

val as_base : t -> Base.t

as_base c is c as a base audio context.

val length : t -> int

length c is the length of the buffer in sample-frames.

val start_rendering : t -> Buffer.t Fut.or_error

start_rendering c starts rendering the audio graph and determines with the rendered audio buffer.

val suspend : t -> secs:float -> unit Fut.or_error

suspend c suspends rendering for secs seconds.

val resume : t -> unit Fut.or_error

resume c resumes rendering.

OCaml

Innovation. Community. Security.