CDPotion.Domain.WebAudio (cdpotion v0.1.4)

Summary

Types

Protocol object for AudioListener

Protocol object for AudioNode

Protocol object for AudioParam

Enum of AudioParam::AutomationRate from the spec

Protocol object for BaseAudioContext

Enum of AudioNode::ChannelCountMode from the spec

Enum of AudioNode::ChannelInterpretation from the spec

Fields in AudioContext that change in real-time.

Enum of AudioContextState from the spec

Enum of BaseAudioContext types

An unique ID for a graph object (AudioContext, AudioNode, AudioParam) in Web Audio API

Enum of AudioNode types

Enum of AudioParam types

Functions

Disables the WebAudio domain.

Enables the WebAudio domain and starts sending context lifetime events.

Fetch the realtime data from the registered contexts.

Types

Link to this type

audio_listener()

@type audio_listener() :: %{
  contextId: graph_object_id(),
  listenerId: graph_object_id()
}

Protocol object for AudioListener

Link to this type

audio_node()

@type audio_node() :: %{
  channelCount: number(),
  channelCountMode: channel_count_mode(),
  channelInterpretation: channel_interpretation(),
  contextId: graph_object_id(),
  nodeId: graph_object_id(),
  nodeType: node_type(),
  numberOfInputs: number(),
  numberOfOutputs: number()
}

Protocol object for AudioNode

Link to this type

audio_param()

@type audio_param() :: %{
  contextId: graph_object_id(),
  defaultValue: number(),
  maxValue: number(),
  minValue: number(),
  nodeId: graph_object_id(),
  paramId: graph_object_id(),
  paramType: param_type(),
  rate: automation_rate()
}

Protocol object for AudioParam

Link to this type

automation_rate()

@type automation_rate() :: :"a-rate" | :"k-rate"

Enum of AudioParam::AutomationRate from the spec

Link to this type

base_audio_context()

@type base_audio_context() :: %{
  callbackBufferSize: number(),
  contextId: graph_object_id(),
  contextState: context_state(),
  contextType: context_type(),
  maxOutputChannelCount: number(),
  realtimeData: context_realtime_data() | nil,
  sampleRate: number()
}

Protocol object for BaseAudioContext

Link to this type

channel_count_mode()

@type channel_count_mode() :: :"clamped-max" | :explicit | :max

Enum of AudioNode::ChannelCountMode from the spec

Link to this type

channel_interpretation()

@type channel_interpretation() :: :discrete | :speakers

Enum of AudioNode::ChannelInterpretation from the spec

Link to this type

context_realtime_data()

@type context_realtime_data() :: %{
  callbackIntervalMean: number(),
  callbackIntervalVariance: number(),
  currentTime: number(),
  renderCapacity: number()
}

Fields in AudioContext that change in real-time.

Link to this type

context_state()

@type context_state() :: :suspended | :running | :closed

Enum of AudioContextState from the spec

Link to this type

context_type()

@type context_type() :: :realtime | :offline

Enum of BaseAudioContext types

Link to this type

graph_object_id()

@type graph_object_id() :: String.t()

An unique ID for a graph object (AudioContext, AudioNode, AudioParam) in Web Audio API

@type node_type() :: String.t()

Enum of AudioNode types

Link to this type

param_type()

@type param_type() :: String.t()

Enum of AudioParam types

Functions

@spec disable() :: {String.t(), map()}

Disables the WebAudio domain.

@spec enable() :: {String.t(), map()}

Enables the WebAudio domain and starts sending context lifetime events.

Link to this function

get_realtime_data(context_id)

@spec get_realtime_data(graph_object_id()) :: {String.t(), map()}

Fetch the realtime data from the registered contexts.

Parameters:

  • (Required) context_id: description not provided :(