WebAudio

class WebAudio(cdp: CDP) : Domain

This domain allows inspection of Web Audio API. https://webaudio.github.io/web-audio-api/

Constructors

Link copied to clipboard
constructor(cdp: CDP)

Types

Link copied to clipboard
@Serializable
data class AudioListener(val listenerId: String, val contextId: String)

Protocol object for AudioListener

Link copied to clipboard
@Serializable
data class AudioListenerCreatedParameter(val listener: WebAudio.AudioListener)

Notifies that the construction of an AudioListener has finished.

Link copied to clipboard
@Serializable
data class AudioListenerWillBeDestroyedParameter(val contextId: String, val listenerId: String)

Notifies that a new AudioListener has been created.

Link copied to clipboard
@Serializable
data class AudioNode(val nodeId: String, val contextId: String, val nodeType: String, val numberOfInputs: Double, val numberOfOutputs: Double, val channelCount: Double, val channelCountMode: WebAudio.ChannelCountMode, val channelInterpretation: WebAudio.ChannelInterpretation)

Protocol object for AudioNode

Link copied to clipboard
@Serializable
data class AudioNodeCreatedParameter(val node: WebAudio.AudioNode)

Notifies that a new AudioNode has been created.

Link copied to clipboard
@Serializable
data class AudioNodeWillBeDestroyedParameter(val contextId: String, val nodeId: String)

Notifies that an existing AudioNode has been destroyed.

Link copied to clipboard
@Serializable
data class AudioParam(val paramId: String, val nodeId: String, val contextId: String, val paramType: String, val rate: WebAudio.AutomationRate, val defaultValue: Double, val minValue: Double, val maxValue: Double)

Protocol object for AudioParam

Link copied to clipboard
@Serializable
data class AudioParamCreatedParameter(val param: WebAudio.AudioParam)

Notifies that a new AudioParam has been created.

Link copied to clipboard
@Serializable
data class AudioParamWillBeDestroyedParameter(val contextId: String, val nodeId: String, val paramId: String)

Notifies that an existing AudioParam has been destroyed.

Link copied to clipboard

Enum of AudioParam::AutomationRate from the spec

Link copied to clipboard
@Serializable
data class BaseAudioContext(val contextId: String, val contextType: WebAudio.ContextType, val contextState: WebAudio.ContextState, val realtimeData: WebAudio.ContextRealtimeData? = null, val callbackBufferSize: Double, val maxOutputChannelCount: Double, val sampleRate: Double)

Protocol object for BaseAudioContext

Link copied to clipboard

Enum of AudioNode::ChannelCountMode from the spec

Link copied to clipboard

Enum of AudioNode::ChannelInterpretation from the spec

Link copied to clipboard
@Serializable
data class ContextChangedParameter(val context: WebAudio.BaseAudioContext)

Notifies that existing BaseAudioContext has changed some properties (id stays the same)..

Link copied to clipboard
@Serializable
data class ContextCreatedParameter(val context: WebAudio.BaseAudioContext)

Notifies that a new BaseAudioContext has been created.

Link copied to clipboard
@Serializable
data class ContextRealtimeData(val currentTime: Double, val renderCapacity: Double, val callbackIntervalMean: Double, val callbackIntervalVariance: Double)

Fields in AudioContext that change in real-time.

Link copied to clipboard

Enum of AudioContextState from the spec

Link copied to clipboard
@Serializable
enum ContextType : Enum<WebAudio.ContextType>

Enum of BaseAudioContext types

Link copied to clipboard
@Serializable
data class ContextWillBeDestroyedParameter(val contextId: String)

Notifies that an existing BaseAudioContext will be destroyed.

Link copied to clipboard
@Serializable
data class GetRealtimeDataParameter(val contextId: String)
Link copied to clipboard
@Serializable
data class GetRealtimeDataReturn(val realtimeData: WebAudio.ContextRealtimeData)
Link copied to clipboard
@Serializable
data class NodeParamConnectedParameter(val contextId: String, val sourceId: String, val destinationId: String, val sourceOutputIndex: Double? = null)

Notifies that an AudioNode is connected to an AudioParam.

Link copied to clipboard
@Serializable
data class NodeParamDisconnectedParameter(val contextId: String, val sourceId: String, val destinationId: String, val sourceOutputIndex: Double? = null)

Notifies that an AudioNode is disconnected to an AudioParam.

Link copied to clipboard
@Serializable
data class NodesConnectedParameter(val contextId: String, val sourceId: String, val destinationId: String, val sourceOutputIndex: Double? = null, val destinationInputIndex: Double? = null)

Notifies that two AudioNodes are connected.

Link copied to clipboard
@Serializable
data class NodesDisconnectedParameter(val contextId: String, val sourceId: String, val destinationId: String, val sourceOutputIndex: Double? = null, val destinationInputIndex: Double? = null)

Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.

Properties

Link copied to clipboard

Notifies that the construction of an AudioListener has finished.

Link copied to clipboard

Notifies that a new AudioListener has been created.

Link copied to clipboard

Notifies that a new AudioNode has been created.

Link copied to clipboard

Notifies that an existing AudioNode has been destroyed.

Link copied to clipboard

Notifies that a new AudioParam has been created.

Link copied to clipboard

Notifies that an existing AudioParam has been destroyed.

Link copied to clipboard

Notifies that existing BaseAudioContext has changed some properties (id stays the same)..

Link copied to clipboard

Notifies that a new BaseAudioContext has been created.

Link copied to clipboard

Notifies that an existing BaseAudioContext will be destroyed.

Link copied to clipboard

Notifies that an AudioNode is connected to an AudioParam.

Link copied to clipboard

Notifies that an AudioNode is disconnected to an AudioParam.

Link copied to clipboard

Notifies that two AudioNodes are connected.

Link copied to clipboard

Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.

Functions

Link copied to clipboard
suspend fun disable(mode: CommandMode = CommandMode.DEFAULT)

Disables the WebAudio domain.

Link copied to clipboard
suspend fun enable(mode: CommandMode = CommandMode.DEFAULT)

Enables the WebAudio domain and starts sending context lifetime events.

Link copied to clipboard

Fetch the realtime data from the registered contexts.