Decodes a PCM (8, 16, 24 or 32 bit) or float32 WAVE file to stereo frames: a mono file is duplicated to both channels, and channels past the second are dropped.
import { decodeWav } from '@datamoc/mwg/audio';declare const bytes: Uint8Array;const { sampleRate, left } = decodeWav(bytes);console.log(sampleRate, left.length); Copy
import { decodeWav } from '@datamoc/mwg/audio';declare const bytes: Uint8Array;const { sampleRate, left } = decodeWav(bytes);console.log(sampleRate, left.length);
Decodes a PCM (8, 16, 24 or 32 bit) or float32 WAVE file to stereo frames: a mono file is duplicated to both channels, and channels past the second are dropped.