Class: Decoder

Decoder(conf)

Deserialize ArrayBuffer to AudioBuffer.

Constructor

new Decoder(conf)

Parameters:
Name Type Description
conf Configuration Configuration object.
Source:

Methods

execute(src, dstopt) → {AudioBuffer}

Deserialize ArrayBuffer to AudioBuffer.
Parameters:
Name Type Attributes Description
src ArrayBuffer
dst AudioBuffer <optional>
If not specified, generate AudioBuffer object in this method.
Source:
Throws:
  • If the length extracted from 'src' argument does not match dst.length.
    Type
    InvalidAudioBufferLengthError
  • If the sampleRate extracted from 'src' argument does not match dst.sampleRate.
    Type
    InvalidSampleRateError
  • If the numberOfChannels extracted from 'src' argument does not match dst.numberOfChannels.
    Type
    InvalidNumberOfChannelsError
Returns:
Type
AudioBuffer