Module Node.Worklet

Worklet nodes.

type opts

The type for AudioWorkletOptions.

val opts : ?⁠channel_count:int -> ?⁠channel_count_mode:Channel_count_mode.t -> ?⁠channel_interpretation:Channel_interpretation.t -> ?⁠input_count:int -> ?⁠output_count:int -> ?⁠output_channel_count:int list -> ?⁠parameters:Jv.t -> ?⁠processor_options:Jv.t -> unit -> opts

opts () are worklet node options with given parameters.

type t

The type for AudioWorkletNode objects.

val create : ?⁠opts:opts -> context -> Jstr.t -> t

create ~opts c n creates a worklet node.

val as_node : t -> node

as_node n is n as an audio node.

val parameter : t -> Jstr.t -> Param.t

parameter n p is the parameter p of n.

val port : t -> Brr_io.Message.Port.t

port n is the port of n.