package js.html.audio
Available on jsObjects of these types are designed to hold small audio snippets, typically less than 45 s. For longer sounds, objects implementing the
MediaElementAudioSourceNodeare more suitable. The buffer contains data in the following format: non-interleaved IEEE754 32-bit linear PCM with a nominal range between-1and+1, that is, 32bits floating point buffer, with each samples between -1.0 and 1.0. If theAudioBufferhas multiple channels, they are stored in separate buffer.Documentation AudioBuffer by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
read only duration:FloatReturns a double representing the duration, in seconds, of the PCM data stored in the buffer.
read only length:IntReturns an integer representing the length, in sample-frames, of the PCM data stored in the buffer.
read only numberOfChannels:IntReturns an integer representing the number of discrete audio channels described by the PCM data stored in the buffer.
read only sampleRate:FloatReturns a float representing the sample rate, in samples per second, of the PCM data stored in the buffer.
copyFromChannel (destination:Float32Array, channelNumber:Int, startInChannel:Int = 0):VoidThrows:
null |
DOMError |
|---|
copyToChannel (source:Float32Array, channelNumber:Int, startInChannel:Int = 0):VoidThrows:
null |
DOMError |
|---|
getChannelData (channel:Int):Float32ArrayThrows:
null |
DOMError |
|---|
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/audio/AudioBuffer.html