File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,8 +21,9 @@ export default class Declicker extends EventDispatcher {
2121 // The node we will use for fading to prevent clicks. Use provided node if exists, otherwise create one.
2222 this . gainNode = this . inputNode = this . outputNode = gainNode || Sound . context . createGain ( ) ;
2323
24- this . fadeMaskDuration = 0.02 ; // Duration of the fade, in seconds.
24+ this . fadeMaskDuration = 0.01 ; // Duration of the fade, in seconds.
2525 this . fadeMaskTimeout = null ; // Reference to the timeout for calling an event, to allow cancelling
26+ this . fadePromise = null ;
2627 this . _fadingIn = null ;
2728 }
2829
@@ -64,7 +65,7 @@ export default class Declicker extends EventDispatcher {
6465 }
6566
6667 this . gainNode . gain . cancelScheduledValues ( Sound . context . currentTime ) ;
67- this . gainNode . gain . value = 1 ;
68+ this . gainNode . gain . linearRampToValueAtTime ( 1 , Sound . context . currentTime + 0.01 ) ;
6869 window . clearTimeout ( this . fadeMaskTimeout ) ;
6970 this . fadeMaskTimeout = null ;
7071 this . _fadingIn = null ;
You can’t perform that action at this time.
0 commit comments