-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathindex.js
37 lines (30 loc) · 1.33 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* References:
* - http://tools.ietf.org/html/rfc2361
* - http://www.sonicspot.com/guide/wavefiles.html
* - https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
* - http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html
* - http://www.blitter.com/~russtopia/MIDI/~jglatt/tech/wave.htm
*/
/**
* The `Reader` class accepts a WAVE audio file, emits a "format" event, and
* outputs the raw "data" from the WAVE file (usually raw PCM data, but if the
* WAVE file uses compression then the compressed data will be output, you are
* responsible for uncompressing in that case if necessary).
*/
exports.Reader = require('./lib/reader');
/**
* The `Writer` class outputs a valid WAVE file from the audio data written to
* it. You may set any of the "channels", "sampleRate" or "bitsPerSample"
* properties before writing the first chunk. You may also set the "dataLength" to
* the number of bytes expected in the "data" portion of the WAVE file. If
* "dataLength" is not set, then the maximum valid length for a WAVE file is
* written.
*/
exports.Writer = require('./lib/writer');
/**
* The `FileWriter` is a subclass of `Writer` that automatically takes care of
* writing the "header" event at the end of the stream to the beginning of the
* output file.
*/
exports.FileWriter = require('./lib/file-writer');