--- title: AudioProcessingEvent slug: Web/API/AudioProcessingEvent translation_of: Web/API/AudioProcessingEvent ---
{{APIRef("Web Audio API")}}
The Web Audio API AudioProcessingEvent
represents events that occur when a {{domxref("ScriptProcessorNode")}} input buffer is ready to be processed.
Note: As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by Audio Workers.
The list below includes the properties inherited from its parent, {{domxref("Event")}}.
プロパティ | 型 | 説明 |
---|---|---|
target {{ReadOnlyInline}} |
{{domxref("EventTarget")}} | The event target (the topmost target in the DOM tree). |
type {{ReadOnlyInline}} |
{{domxref("DOMString")}} | The type of event. |
bubbles {{ReadOnlyInline}} |
boolean |
Does the event normally bubble? |
cancelable {{ReadOnlyInline}} |
boolean |
Is it possible to cancel the event? |
playbackTime {{ReadOnlyInline}} |
double |
The time when the audio will be played, as defined by the time of {{domxref("AudioContext.currentTime")}} |
inputBuffer {{ReadOnlyInline}} |
{{domxref("AudioBuffer")}} | The buffer containing the input audio data to be processed. The number of channels is defined as a parameter, numberOfInputChannels , of the factory method {{domxref("AudioContext.createScriptProcessor()")}}. Note the the returned AudioBuffer is only valid in the scope of the onaudioprocess function. |
outputBuffer {{ReadOnlyInline}} |
{{domxref("AudioBuffer")}} | The buffer where the output audio data should be written. The number of channels is defined as a parameter, numberOfOutputChannels , of the factory method {{domxref("AudioContext.createScriptProcessor()")}}. Note the the returned AudioBuffer is only valid in the scope of the onaudioprocess function. |
{{page("/en-US/docs/Web/API/AudioContext.createScriptProcessor","Example")}}
Specification | Status | Comment |
---|---|---|
{{SpecName('Web Audio API', '#the-audioprocessingevent-interface---deprecated', 'AudioProcessingEvent')}} | {{Spec2('Web Audio API')}} |
{{Compat("api.AudioProcessingEvent")}}