diff --git a/README.md b/README.md index 0ae78a3..a13e1d1 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,11 @@ wavDataURI = wav.toDataURI(); #### WaveFile.fromBuffer() Load a .wav file from a byte buffer into a WaveFile object: ```javascript +wav.fromBuffer(buffer); +``` + +This is the same as passing the buffer when creating the WaveFile object: +```javascript let wav = new Wavefile(buffer); ``` diff --git a/docs/WaveFile.html b/docs/WaveFile.html index 25c621d..35fd348 100644 --- a/docs/WaveFile.html +++ b/docs/WaveFile.html @@ -3316,7 +3316,7 @@

toRIFX
- Documentation generated by JSDoc 3.5.5 on Mon May 07 2018 00:36:13 GMT-0300 (Hora oficial do Brasil) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Mon May 07 2018 00:45:23 GMT-0300 (Hora oficial do Brasil) using the docdash theme.
diff --git a/docs/index.html b/docs/index.html index b732ba7..186d55d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -110,6 +110,7 @@

Use

const fs = req
 // Call toDataURI() to get the file as a base64-encoded
 // DataURI to load the file a web browser:
 wavDataURI = wav.toDataURI();

Main methods:

WaveFile.fromBuffer()

Load a .wav file from a byte buffer into a WaveFile object:

+
wav.fromBuffer(buffer);

This is the same as passing the buffer when creating the WaveFile object:

let wav = new Wavefile(buffer);

WaveFile.fromScratch()

Create a WaveFile object with the arguments you pass:

// A mono, 44.1 kHz, 32-bit .wav file with just 4 samples:
 wav.fromScratch(1, 44100, '32', [0, -2147483648, 2147483647, 4]);

WaveFile.toBuffer()

Return a Uint8Array with the WaveFile object data. The buffer is a .wav file and can be written to disk:

@@ -342,7 +343,7 @@

LICENSE

Copyright (c) 2017-2018 Rafael da Silva Rocha.


- Documentation generated by JSDoc 3.5.5 on Mon May 07 2018 00:36:13 GMT-0300 (Hora oficial do Brasil) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Mon May 07 2018 00:45:23 GMT-0300 (Hora oficial do Brasil) using the docdash theme.
diff --git a/docs/index.js.html b/docs/index.js.html index ddac29c..a43062e 100644 --- a/docs/index.js.html +++ b/docs/index.js.html @@ -1306,7 +1306,7 @@

index.js


- Documentation generated by JSDoc 3.5.5 on Mon May 07 2018 00:36:13 GMT-0300 (Hora oficial do Brasil) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Mon May 07 2018 00:45:23 GMT-0300 (Hora oficial do Brasil) using the docdash theme.