Audio.Context
Audio contexts.
module State : sig ... end
The context state enumeration.
module Base : sig ... end
Base audio contexts.
module Latency_category : sig ... end
Audio latency category enumeration.
The type for AudioContextOptions
.
val opts :
?latency_hint:[ `Category of Latency_category.t | `Secs of float ] ->
?sample_rate_hz:float ->
unit ->
opts
opts ()
are audio context options with the given properties.
The type for AudioContext
objects.
val as_target : t -> Brr.Ev.target
as_target c
is c
as an event target.
val base_latency : t -> float
base_latency c
is the base latency of c
.
val output_latency : t -> float
output_latency c
is the output latency of c
.
val get_output_timestamp : t -> Timestamp.t
get_output_timestamp c
is the output timestamp of c
.
val resume : t -> unit Fut.or_error
resume c
resumes progression of time in c
.
val suspend : t -> unit Fut.or_error
suspend c
suspend progression of time in c
.
val close : t -> unit Fut.or_error
close c
closes the audio context c
.
module Offline : sig ... end
Offline audio contexts.