Interface AudioProcessingEvent

This interface is a type of Event which is passed to the onaudioprocess event handler used by ScriptProcessorNode.

The event handler processes audio from the input (if any) by accessing the audio data from the inputBuffer attribute. The audio data which is the result of the processing (or the synthesized data if there are no inputs) is then placed into the outputBuffer.

Hierarchy

  • Event
    • AudioProcessingEvent

Index

Properties

Methods

Properties

public AT_TARGET: number

public BUBBLING_PHASE: number

public CAPTURING_PHASE: number

public bubbles: boolean

public cancelBubble: boolean

public cancelable: boolean

public currentTarget: EventTarget

public defaultPrevented: boolean

public eventPhase: number

public inputBuffer: AudioBuffer

An AudioBuffer containing the input audio data. It will have a number of channels equal to the numberOfInputChannels parameter of the createScriptProcessor() method. This AudioBuffer is only valid while in the scope of the onaudioprocess function. Its values will be meaningless outside of this scope.

public isTrusted: boolean

public node: ScriptProcessorNode

The ScriptProcessorNode associated with this processing event.

public outputBuffer: AudioBuffer

An AudioBuffer where the output audio data should be written. It will have a number of channels equal to the numberOfOutputChannels parameter of the createScriptProcessor() method. Script code within the scope of the onaudioprocess function is expected to modify the Float32Array arrays representing channel data in this AudioBuffer. Any script modifications to this AudioBuffer outside of this scope will not produce any audible effects.

public playbackTime: number

The time when the audio will be played in the same time coordinate system as AudioContext.currentTime. playbackTime allows for very tight synchronization between processing directly in JavaScript with the other events in the context's rendering graph.

public srcElement: Element

public target: EventTarget

public timeStamp: number

public type: string

Methods

public initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean)

Parameters

  • eventTypeArg: string
  • canBubbleArg: boolean
  • cancelableArg: boolean

public preventDefault()

public stopImmediatePropagation()

public stopPropagation()