{{APIRef("Web Audio API")}}{{deprecated_header}}
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.
Properties
The list below includes the properties inherited from its parent, {{domxref("Event")}}.
Property | Type | Description |
---|---|---|
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. |
Example
{{page("/en-US/docs/Web/API/AudioContext.createScriptProcessor","Example")}}
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('Web Audio API', '#the-audioprocessingevent-interface---deprecated', 'AudioProcessingEvent')}} | {{Spec2('Web Audio API')}} |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatChrome(10.0)}}{{property_prefix("webkit")}} | {{CompatGeckoDesktop(25.0)}} | {{CompatNo}} | 15.0{{property_prefix("webkit")}} 22 (unprefixed) |
6.0{{property_prefix("webkit")}} |
Feature | Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | {{CompatUnknown}} | 26.0 | 1.2 | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | 33.0 |