File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -14,16 +14,8 @@ class VolumeEffect {
14
14
this . gain . gain . setValueAtTime ( volume , endSeconds ) ;
15
15
this . gain . gain . exponentialRampToValueAtTime ( 1.0 , endSeconds + this . rampLength ) ;
16
16
17
- // Use a waveshaper node to prevent sample values from exceeding -1 or 1.
18
- // Without this, gain can cause samples to exceed this range, then they
19
- // are clipped on save, and the sound is distorted on load.
20
- this . waveShaper = this . audioContext . createWaveShaper ( ) ;
21
- this . waveShaper . curve = new Float32Array ( [ - 1 , 1 ] ) ;
22
- this . waveShaper . oversample = 'none' ;
23
-
24
17
this . input . connect ( this . gain ) ;
25
- this . gain . connect ( this . waveShaper ) ;
26
- this . waveShaper . connect ( this . output ) ;
18
+ this . gain . connect ( this . output ) ;
27
19
}
28
20
}
29
21
You can’t perform that action at this time.
0 commit comments