Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 915559 of AudioProcessingEvent

  • Revision slug: Web/API/AudioProcessingEvent
  • Revision title: AudioProcessingEvent
  • Revision id: 915559
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment

Revision Content

{{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.

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

See also

Revision Source

<p>{{APIRef("Web Audio API")}}</p>

<p><span class="seoSummary">The <a href="/en-US/docs/Web_Audio_API" title="/en-US/docs/Web_Audio_API">Web Audio API</a> <code>AudioProcessingEvent</code> represents events that occur when a {{domxref("ScriptProcessorNode")}} input buffer is ready to be processed.</span></p>

<div class="note">
<p><strong>Note</strong>: 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 <a href="/en-US/docs/Web/API/Web_Audio_API#Audio_Workers">Audio Workers</a>.</p>
</div>

<h2 id="Properties">Properties</h2>

<p><em>The list below includes the properties inherited from its parent, {{domxref("Event")}}</em>.</p>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Property</th>
   <th scope="col">Type</th>
   <th scope="col">Description</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td><code>target</code> {{ReadOnlyInline}}</td>
   <td>{{domxref("EventTarget")}}</td>
   <td>The event target (the topmost target in the DOM tree).</td>
  </tr>
  <tr>
   <td><code>type</code> {{ReadOnlyInline}}</td>
   <td>{{domxref("DOMString")}}</td>
   <td>The type of event.</td>
  </tr>
  <tr>
   <td><code>bubbles</code> {{ReadOnlyInline}}</td>
   <td><code>boolean</code></td>
   <td>Does the event normally bubble?</td>
  </tr>
  <tr>
   <td><code>cancelable</code> {{ReadOnlyInline}}</td>
   <td><code>boolean</code></td>
   <td>Is it possible to cancel the event?</td>
  </tr>
  <tr>
   <td><code>playbackTime</code> {{ReadOnlyInline}}</td>
   <td><code>double</code></td>
   <td>The time when the audio will be played, as defined by the time of {{domxref("AudioContext.currentTime")}}</td>
  </tr>
  <tr>
   <td><code>inputBuffer</code> {{ReadOnlyInline}}</td>
   <td>{{domxref("AudioBuffer")}}</td>
   <td>The buffer containing the input audio data to be processed. The number of channels is defined as a parameter, <code>numberOfInputChannels</code>, of the factory method {{domxref("AudioContext.createScriptProcessor()")}}. Note the the returned <code>AudioBuffer</code> is only valid in the scope of the <code>onaudioprocess</code> function.</td>
  </tr>
  <tr>
   <td><code>outputBuffer</code> {{ReadOnlyInline}}</td>
   <td>{{domxref("AudioBuffer")}}</td>
   <td>The buffer where the output audio data should be written. The number of channels is defined as a parameter, <code>numberOfOutputChannels</code>, of the factory method {{domxref("AudioContext.createScriptProcessor()")}}. Note the the returned <code>AudioBuffer</code> is only valid in the scope of the <code>onaudioprocess</code> function.</td>
  </tr>
 </tbody>
</table>

<h2 id="Example">Example</h2>

<p>{{page("/en-US/docs/Web/API/AudioContext.createScriptProcessor","Example")}}</p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Web Audio API', '#the-audioprocessingevent-interface---deprecated', 'AudioProcessingEvent')}}</td>
   <td>{{Spec2('Web Audio API')}}</td>
   <td>&nbsp;</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<div>{{CompatibilityTable}}</div>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatChrome(10.0)}}{{property_prefix("webkit")}}</td>
   <td>{{CompatGeckoDesktop(25.0)}}&nbsp;</td>
   <td>{{CompatNo}}</td>
   <td>15.0{{property_prefix("webkit")}}<br />
    22 (unprefixed)</td>
   <td>6.0{{property_prefix("webkit")}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>Firefox OS</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
   <th>Chrome for Android</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>26.0</td>
   <td>1.2</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>33.0</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="See_also">See also</h2>

<ul>
 <li><a href="/en-US/docs/Web_Audio_API/Using_Web_Audio_API">Using the Web Audio API</a></li>
</ul>
Revert to this revision