node.js Stream utility to convert PCM audio data bit depth from 16-bit to 32-bit or 32-bit to 16-bit.
var fs = require('fs');
var Converter = require('pcm-bitdepth-converter').From16To32Bit;
var reader = fs.createReadStream('./source.pcm');
var writer = fs.createWriteStream('./destination.pcm');
var converter = new Converter();
reader.pipe(converter);
converter.pipe(writer);
From16To32Bit
is a Transformer stream.
Create a new instance of a converter stream handler to convert 16-bit PCM audio data to 32-bit.
From32To16Bit
is a Transformer stream.
Create a new instance of a converter stream handler to convert 32-bit PCM audio data to 16-bit.