Utils to tamper with PCM formats/buffers. In particular, converting Buffer to AudioBuffer, ArrayBuffer to AudioBuffer, AudioBuffer to ArrayBuffer or AudioBuffer to Buffer.
var pcm = require('pcm-util')
Default PCM format to use for any operations
pcm.defaults === {
channels: 2,
sampleRate: 44100,
interleaved: true,
float: false,
signed: true,
bitDepth: 16,
byteOrder: 'LE',
max: 32767,
min: -32768,
samplesPerFrame: 1024,
id: 'S_16_LE_2_44100_I'
}
Normalize passed format: ensure all the properties are present and do not contradict.
Retrieve format-related properties from audio buffer, return not normalized format.
Compare whether two formats are equal to each other.
Convert buffer/arrayBuffer with the format
to audio buffer.
Convert audio buffer to array buffer with the format
.
Convert array buffer from one format to another.
audio-buffer — audio buffer polyfill.
audio-buffer-utils — utils for audio buffers.