# AudioBuffer WebAudioContext.createBuffer(number numOfChannels, number length, number sampleRate)
with Promise style call: Not supported
Mini Program plugin: Not supported
Create an AudioBuffer that represents a short audio segment that resides in memory
# parameter
# number numOfChannels
Defined buffer Integer number of audio channels contained in the
# number length
representative buffer Integer number of sample frames in
# number sampleRate
Sampling rate of linear audio samples, that is, the number of key frames per second
# Return value
# AudioBuffer
buffer Returns an instance of AudioBuffer
# sample code
sample code
const audioCtx = wx.createWebAudioContext()
const channels = 2, frameCount = audioCtx.sampleRate * 2.0
const myArrayBuffer = audioCtx.createBuffer(channels, frameCount, audioCtx.sampleRate)