Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AudioTransformDevice

A device that applies some transform to another device, returning a device and optional AudioNode for use by the device controller.

The results are applied by the device controller in two stages:

  1. The transform device is used to retrieve the constraints that identify an inner media stream. This will be managed by the controller.
  2. The transform device provides a Web Audio node that will be connected between the input and the output of the device controller's audio graph. This is returned as a pair, (start, end), to allow an arbitrary subgraph of nodes to be returned.

The application should call stop when the device will no longer be used. This method is defined on this interface to establish that convention.

Hierarchy

  • AudioTransformDevice

Implemented by

Index

Methods

Optional createAudioNode

  • Optionally return a pair of AudioNodes that should be connected to the applied inner device. The two nodes can be the same, indicating the smallest possible subgraph.

    Each device can be used no more than once at a time in an audio graph. It is acceptable to reuse audio nodes for successive calls to createAudioNode, so long as the context does not differ.

    Parameters

    • context: AudioContext

      The AudioContext to use when instantiating the nodes.

    Returns Promise<AudioNodeSubgraph>

intrinsicDevice

  • intrinsicDevice(): Promise<Device>

mute

  • mute(muted: boolean): Promise<void>
  • Called when realtimeMuteLocalAudio is called on the RealtimeController. Implement this callback to avoid doing expensive processing when the audio output is disabled.

    Parameters

    • muted: boolean

    Returns Promise<void>

stop

  • stop(): Promise<void>
  • stop should be called by the application to free any resources associated with the device (e.g., workers).

    After this is called, the device should be discarded.

    Returns Promise<void>

Generated using TypeDoc