Class AudioBuffer

Represents a short audio asset residing in memory, created from an audio file using the decodeAudioData method, or from raw data using createBuffer. Once put into an AudioBuffer, the audio can then be played by being passed into an AudioBufferSourceNode.

Hierarchy

  • AudioBuffer

Implements

Constructors

Accessors

  • get duration(): number
  • Returns number

  • get length(): number
  • Returns number

  • get numberOfChannels(): number
  • Returns number

  • get sampleRate(): number
  • Returns number

Methods

  • Parameters

    • destination: Float32Array
    • channelNumber: number
    • Optional bufferOffset: number

    Returns void

  • Parameters

    • source: Float32Array
    • channelNumber: number
    • Optional bufferOffset: number

    Returns void

  • Returns a Float32Array containing the PCM data associated with the requested channel.

    Parameters

    • channel: number

      An index representing the particular channel to get data for. An index value of 0 represents the first channel.

    Returns Float32Array

Generated using TypeDoc