You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ With **wavefile** you can:
23
23
- Create wav files
24
24
- Read wav files
25
25
- Change the bit depth of the audio
26
+
- Change the sample rate of the audio
26
27
- Read and write RIFF tags
27
28
- Set and delete cue points and their labels
28
29
- Create regions in wav files
@@ -371,7 +372,7 @@ wav.fromMuLaw("24");
371
372
```
372
373
373
374
### Change the bit depth
374
-
You can change the bit depth of the audio with the **toBitDepth(bitDepth)** method.
375
+
You can change the bit depth of the audio with the **toBitDepth(bitDepth)** method. WaveFile only change the bit depth of the samples; no dithering is done.
375
376
```javascript
376
377
// Load a wav file with 32-bit audio
377
378
let wav =newWaveFile(fs.readFileSync("32bit-file.wav"));
@@ -675,16 +676,7 @@ WaveFile.listTags() {}
675
676
676
677
/**
677
678
* Create a cue point in the wave file.
678
-
* @param{!{
679
-
* position: number,
680
-
* label: ?string,
681
-
* end: ?number,
682
-
* dwPurposeID: ?number,
683
-
* dwCountry: ?number,
684
-
* dwLanguage: ?number,
685
-
* dwDialect: ?number,
686
-
* dwCodePage: ?number
687
-
* }} pointData A object with the data of the cue point.
679
+
* @param{!Object}pointData A object with the data of the cue point.
688
680
*
689
681
* # Only required attribute to create a cue point:
690
682
* pointData.position: The position of the point in milliseconds
@@ -703,6 +695,18 @@ WaveFile.listTags() {}
703
695
* pointData.dwLanguage
704
696
* pointData.dwDialect
705
697
* pointData.dwCodePage
698
+
*
699
+
* # This is what a complete pointData object look like:
Copy file name to clipboardExpand all lines: docs/index.html
+15-11Lines changed: 15 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,7 @@ <h2>Notice</h2>
77
77
<li>Create wav files</li>
78
78
<li>Read wav files</li>
79
79
<li>Change the bit depth of the audio</li>
80
+
<li>Change the sample rate of the audio</li>
80
81
<li>Read and write RIFF tags</li>
81
82
<li>Set and delete cue points and their labels</li>
82
83
<li>Create regions in wav files</li>
@@ -362,7 +363,7 @@ <h3>mu-Law</h3>
362
363
wav.fromMuLaw("24");
363
364
</code></pre>
364
365
<h3>Change the bit depth</h3>
365
-
<p>You can change the bit depth of the audio with the <strong>toBitDepth(bitDepth)</strong> method.</p>
366
+
<p>You can change the bit depth of the audio with the <strong>toBitDepth(bitDepth)</strong> method. WaveFile only change the bit depth of the samples; no dithering is done.</p>
366
367
<preclass="prettyprint source lang-javascript"><code>// Load a wav file with 32-bit audio
367
368
let wav = new WaveFile(fs.readFileSync("32bit-file.wav"));
0 commit comments