File tree Expand file tree Collapse file tree 3 files changed +1
-23
lines changed Expand file tree Collapse file tree 3 files changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -265,7 +265,6 @@ const SoundEditor = props => (
265
265
onClick = { props . onSlower }
266
266
/>
267
267
< IconButton
268
- disabled = { props . tooLoud }
269
268
className = { classNames ( styles . effectButton , styles . flipInRtl ) }
270
269
img = { louderIcon }
271
270
title = { < FormattedMessage { ...messages . louder } /> }
@@ -341,7 +340,6 @@ SoundEditor.propTypes = {
341
340
onUndo : PropTypes . func . isRequired ,
342
341
playhead : PropTypes . number ,
343
342
setRef : PropTypes . func ,
344
- tooLoud : PropTypes . bool . isRequired ,
345
343
trimEnd : PropTypes . number ,
346
344
trimStart : PropTypes . number
347
345
} ;
Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ import log from '../lib/log.js';
14
14
15
15
const UNDO_STACK_SIZE = 99 ;
16
16
17
- const MAX_RMS = 1.2 ;
18
-
19
17
class SoundEditor extends React . Component {
20
18
constructor ( props ) {
21
19
super ( props ) ;
@@ -267,15 +265,6 @@ class SoundEditor extends React.Component {
267
265
}
268
266
} ) ;
269
267
}
270
- tooLoud ( ) {
271
- const numChunks = this . state . chunkLevels . length ;
272
- const startIndex = this . state . trimStart === null ?
273
- 0 : Math . floor ( this . state . trimStart * numChunks ) ;
274
- const endIndex = this . state . trimEnd === null ?
275
- numChunks - 1 : Math . ceil ( this . state . trimEnd * numChunks ) ;
276
- const trimChunks = this . state . chunkLevels . slice ( startIndex , endIndex ) ;
277
- return Math . max ( ...trimChunks ) > MAX_RMS ;
278
- }
279
268
getUndoItem ( ) {
280
269
return {
281
270
...this . copyCurrentBuffer ( ) ,
@@ -410,7 +399,6 @@ class SoundEditor extends React.Component {
410
399
name = { this . props . name }
411
400
playhead = { this . state . playhead }
412
401
setRef = { this . setRef }
413
- tooLoud = { this . tooLoud ( ) }
414
402
trimEnd = { this . state . trimEnd }
415
403
trimStart = { this . state . trimStart }
416
404
onChangeName = { this . handleChangeName }
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