Skip to content

Commit

Permalink
WaveFile.toBuffer() doc on README
Browse files Browse the repository at this point in the history
  • Loading branch information
rochars committed May 7, 2018
1 parent 2e96db2 commit de0a164
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
```

Expand Down
2 changes: 1 addition & 1 deletion docs/WaveFile.html
Original file line number Diff line number Diff line change
Expand Up @@ -3316,7 +3316,7 @@ <h4 class="name" id="toRIFX"><span class="type-signature"></span>toRIFX<span cla
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 07 2018 00:36:13 GMT-0300 (Hora oficial do Brasil) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 07 2018 00:45:23 GMT-0300 (Hora oficial do Brasil) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
3 changes: 2 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ <h2>Use</h2><pre class="prettyprint source lang-javascript"><code>const fs = req
// Call toDataURI() to get the file as a base64-encoded
// DataURI to load the file a web browser:
wavDataURI = wav.toDataURI();</code></pre><h3>Main methods:</h3><h4>WaveFile.fromBuffer()</h4><p>Load a .wav file from a byte buffer into a WaveFile object:</p>
<pre class="prettyprint source lang-javascript"><code>wav.fromBuffer(buffer);</code></pre><p>This is the same as passing the buffer when creating the WaveFile object:</p>
<pre class="prettyprint source lang-javascript"><code>let wav = new Wavefile(buffer);</code></pre><h4>WaveFile.fromScratch()</h4><p>Create a WaveFile object with the arguments you pass:</p>
<pre class="prettyprint source lang-javascript"><code>// A mono, 44.1 kHz, 32-bit .wav file with just 4 samples:
wav.fromScratch(1, 44100, '32', [0, -2147483648, 2147483647, 4]);</code></pre><h4>WaveFile.toBuffer()</h4><p>Return a Uint8Array with the WaveFile object data. The buffer is a .wav file and can be written to disk:</p>
Expand Down Expand Up @@ -342,7 +343,7 @@ <h2>LICENSE</h2><p>Copyright (c) 2017-2018 Rafael da Silva Rocha.</p>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 07 2018 00:36:13 GMT-0300 (Hora oficial do Brasil) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 07 2018 00:45:23 GMT-0300 (Hora oficial do Brasil) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ <h1 class="page-title">index.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 07 2018 00:36:13 GMT-0300 (Hora oficial do Brasil) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 07 2018 00:45:23 GMT-0300 (Hora oficial do Brasil) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down

0 comments on commit de0a164

Please sign in to comment.