createBuffer

fun createBuffer(numberOfChannels: Int, length: Int, sampleRate: Float): AudioBuffer(source)

The createBuffer() method of the BaseAudioContext Interface is used to create a new, empty AudioBuffer object, which can then be populated by data, and played via an AudioBufferSourceNode.

MDN Reference