File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,11 +31,14 @@ class RangedSlider extends Slider {
3131 // should be overridden to set up the slider
3232 }
3333
34+ postUpdateValue ( p ) { }
35+
3436 updateValue ( p ) {
3537 this . settings [ this . propName ] = this . slider . value ( ) ;
3638 this . displayVal = this . calcDisplayVal ( ) ;
3739 this . textBox . value ( this . displayVal ) ;
3840 this . textLabel . html ( this . name + ': ' ) ;
41+ this . postUpdateValue ( ) ;
3942 }
4043
4144 makeSlider ( p ) {
@@ -302,8 +305,23 @@ class AntialiasingSlider extends RangedSlider {
302305 this . max = 200 ;
303306 this . initial = 0 ;
304307 this . step = 2 ;
308+ this . setMaxBasedOnFilterType ( ) ;
305309 this . makeSlider ( p ) ;
306310 }
311+
312+ setMaxBasedOnFilterType ( ) {
313+ if ( this . settings . filterType === "FIR" ) {
314+ this . max = 200 ;
315+ } else if ( this . settings . filterType === "Butterworth" ) {
316+ this . max = 12 ;
317+ } else if ( this . settings . filterType === "Chebyshev" ) {
318+ this . max = 4 ;
319+ }
320+ }
321+
322+ postUpdateValue ( p ) {
323+ this . setMaxBasedOnFilterType ( ) ;
324+ }
307325}
308326
309327class ReconstructionOrderSlider extends RangedSlider {
Original file line number Diff line number Diff line change @@ -212,6 +212,8 @@ function createWidgets() {
212212 playButton . onclick = ( ) => { buttonPlayFunction ( settings . buffers . quantNoise . playback ) ; } ;
213213 } else if ( id === "play-reconstructed" ) {
214214 playButton . onclick = ( ) => { buttonPlayFunction ( settings . buffers . reconstructed . playback ) ; } ;
215+ } else if ( id === "play-delta-sigma" ) {
216+ playButton . onclick = ( ) => { buttonPlayFunction ( settings . buffers . deltaSigma . playback ) } ;
215217 }
216218 }
217219
You can’t perform that action at this time.
0 commit comments