diff --git a/index.html b/index.html index 0522ded6e..cbe19875d 100644 --- a/index.html +++ b/index.html @@ -733,7 +733,7 @@

still be created, through createBuffer or + "#widl-BaseAudioContext-decodeAudioData-Promise-AudioBuffer--ArrayBuffer-audioData-DecodeSuccessCallback-successCallback-DecodeErrorCallback-errorCallback-DecodeAudioDataOptions-options"> decodeAudioData.) @@ -1179,7 +1179,7 @@

responseType to "arraybuffer". Audio file data can be in any of the formats supported by the audio element. The buffer passed to + "#widl-BaseAudioContext-decodeAudioData-Promise-AudioBuffer--ArrayBuffer-audioData-DecodeSuccessCallback-successCallback-DecodeErrorCallback-errorCallback-DecodeAudioDataOptions-options"> decodeAudioData has its content-type determined by sniffing, as described in [[mimesniff]].

@@ -1205,6 +1205,14 @@

A callback function which will be invoked if there is an error decoding the audio file. +
+ optional DecodeAudioDataOptions options +
+
+ Options for + decodeAudioData. +

Although the primary method of interfacing with this function is @@ -1286,9 +1294,13 @@

  • Otherwise:
    1. Take the result, representing the decoded linear PCM - audio data, and resample it to the sample-rate of the + audio data. If disableResampling is + false, resample it to the sample-rate of the AudioContext if it is different from the - sample-rate of audioData. + sample-rate of audioData. Otherwise, resampling is + disabled, and the decoded data is unchanged, with the sample + rate of the AudioBuffer set to the sample rate of the + encoded data.
    2. Queue a task on the control thread's event loop to execute the following steps: @@ -1658,6 +1670,31 @@

      The error that occurred while decoding. +
      +

      + DecodeAudioDataOptions +

      +

      + This dictionary specifies how + decodeAudioData should process the encoded audio data to + produce the decoded linear PCM audio. +

      +
      +
      + boolean disableResampling = false +
      +
      + Controls whether the decoded audio data returned by + decodeAudioData is automatically resampled to the sample rate + of the context. By default, resampling is done. If + disableResampling is true, resampling is not + done, and the returned AudioBuffer has its sample rate set + to the rate specified by the encoded data. +
      +
      +

      Lifetime