AudioBuffer

Overview

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

Location

 

copyFromChannel

Copies the samples from the specified channel of the AudioBuffer to the destination array.

 

method copyFromChannel(pardestination: dynamic; parchannelNumber: dynamic; parstartInChannel: dynamic)

 

void copyFromChannel(dynamic pardestination, dynamic parchannelNumber, dynamic parstartInChannel)

 

func copyFromChannel(_ pardestination: dynamic, _ parchannelNumber: dynamic, _ parstartInChannel: dynamic)

 

void copyFromChannel(dynamic pardestination, dynamic parchannelNumber, dynamic parstartInChannel)

 

Sub copyFromChannel(pardestination As dynamic, parchannelNumber As dynamic, parstartInChannel As dynamic)

Parameters:

  • pardestination:
  • parchannelNumber:
  • parstartInChannel:

duration

 

property duration: Double read;

 

Double duration { get; }

 

var duration: Double { get{} }

 

Double duration { __get; }

 

ReadOnly Property duration() As Double

getChannelData

Returns a Float32Array containing the PCM data associated with the channel, defined by the channel parameter (with 0 representing the first channel).

 

method getChannelData(parchannel: dynamic): Double

 

Double getChannelData(dynamic parchannel)

 

func getChannelData(_ parchannel: dynamic) -> Double

 

Double getChannelData(dynamic parchannel)

 

Function getChannelData(parchannel As dynamic) As Double

Parameters:

  • parchannel:

length

 

property length: Int32 read;

 

Int32 length { get; }

 

var length: Int32 { get{} }

 

Int32 length { __get; }

 

ReadOnly Property length() As Int32

numberOfChannels

 

property numberOfChannels: Int32 read;

 

Int32 numberOfChannels { get; }

 

var numberOfChannels: Int32 { get{} }

 

Int32 numberOfChannels { __get; }

 

ReadOnly Property numberOfChannels() As Int32

sampleRate

 

property sampleRate: Double read;

 

Double sampleRate { get; }

 

var sampleRate: Double { get{} }

 

Double sampleRate { __get; }

 

ReadOnly Property sampleRate() As Double

 

duration

 

property duration: Double read;

 

Double duration { get; }

 

var duration: Double { get{} }

 

Double duration { __get; }

 

ReadOnly Property duration() As Double

length

 

property length: Int32 read;

 

Int32 length { get; }

 

var length: Int32 { get{} }

 

Int32 length { __get; }

 

ReadOnly Property length() As Int32

numberOfChannels

 

property numberOfChannels: Int32 read;

 

Int32 numberOfChannels { get; }

 

var numberOfChannels: Int32 { get{} }

 

Int32 numberOfChannels { __get; }

 

ReadOnly Property numberOfChannels() As Int32

sampleRate

 

property sampleRate: Double read;

 

Double sampleRate { get; }

 

var sampleRate: Double { get{} }

 

Double sampleRate { __get; }

 

ReadOnly Property sampleRate() As Double

 

copyFromChannel

Copies the samples from the specified channel of the AudioBuffer to the destination array.

 

method copyFromChannel(pardestination: dynamic; parchannelNumber: dynamic; parstartInChannel: dynamic)

 

void copyFromChannel(dynamic pardestination, dynamic parchannelNumber, dynamic parstartInChannel)

 

func copyFromChannel(_ pardestination: dynamic, _ parchannelNumber: dynamic, _ parstartInChannel: dynamic)

 

void copyFromChannel(dynamic pardestination, dynamic parchannelNumber, dynamic parstartInChannel)

 

Sub copyFromChannel(pardestination As dynamic, parchannelNumber As dynamic, parstartInChannel As dynamic)

Parameters:

  • pardestination:
  • parchannelNumber:
  • parstartInChannel:

getChannelData

Returns a Float32Array containing the PCM data associated with the channel, defined by the channel parameter (with 0 representing the first channel).

 

method getChannelData(parchannel: dynamic): Double

 

Double getChannelData(dynamic parchannel)

 

func getChannelData(_ parchannel: dynamic) -> Double

 

Double getChannelData(dynamic parchannel)

 

Function getChannelData(parchannel As dynamic) As Double

Parameters:

  • parchannel: