# Float32Array AudioBuffer.getChannelData(number channel)

with Promise style call: Not supported

Mini Program plugin: Not supported

Returns a Float32 Array contains PCM data with channels, defined by channel parameters (0 for first channel)

# parameter

# number channel

Index to get specific channel data

# Return value

# Float32Array

# sample code

sample code


const audioCtx = wx.createWebAudioContext()
const myArrayBuffer = audioCtx.createBuffer(2, frameCount, audioCtx.sampleRate)
const nowBuffering = myArrayBuffer.getChannelData(channel)