This package has been deprecated

Author message:

Code is old, wrong-ish, unlucky name. Copy paste chunks to your codebase, not going to maintain it anymore.

audio-pcm-format

1.1.1 • Public • Published

npm install audio-pcm-format

var PcmFormat = require('audio-pcm-format');
var Speaker = require('node-speaker');
 
 
/** Transform input format to output format */
myStream.pipe(PcmFormat(inputFormat, outputFormat?)).pipe(Speaker());
 
 
/** Default output/input format, extended with passed formats. Redefine if needed. */
PcmFormat.default === {
    //number or order of channels, if array, e. g. [0, 1] → [1, 0]
    channels: 2,
 
    //single sample params
    byteOrder: 'LE',
    bitDepth: 16,
    signed: true,
    float: false,
 
    //resample (optional)
    sampleRate: 44100,
 
    //the way to read/write input/output samples: [LRLRLRLR] or [LLLLRRRR]
    interleaved: true,
 
    //force output chunk size
    samplesPerFrame: undefined
};
 
 

Related
pcm-util — utils for pcm transforms.
pcm-format — transforms pcm stream per sample.

Package Sidebar

Install

npm i audio-pcm-format

Weekly Downloads

4

Version

1.1.1

License

MIT

Last publish

Collaborators

  • dfcreative