<!-- SS · part 177 -->
s.smoothing),this.normalRange?this._rms[e]:Li(this._rms[e])}));return 1===this.channels?e[0]:e}get channels(){return this._analyser.channels}dispose(){return super.dispose(),this._analyser.dispose(),this}}class Ja extends $a{constructor(){const t=ui(Ja.getDefaults(),arguments,["size"]);super(t),this.name="FFT",this.normalRange=t.normalRange,this._analyser.type="fft",this.size=t.size}static getDefaults(){return Object.assign(io.getDefaults(),{normalRange:!1,size:1024,smoothing:.8})}getValue(){return this._analyser.getValue().map((t=>this.normalRange?ji(t):t))}get size(){return this._analyser.size}set size(t){this._analyser.size=t}get smoothing(){return this._analyser.smoothing}set smoothing(t){this._analyser.smoothing=t}getFrequencyOfIndex(t){return Bn(0<=t&&t<this.size,`index must be greater than or equal to 0 and less than ${this.size}`),t*this.context.sampleRate/(2*this.size)}}class Ka extends $a{constructor(){super(ui(Ka.getDefaults(),arguments)),this.name="DCMeter",this._analyser.type="waveform",this._analyser.size=256}getValue(){return this._analyser.getValue()[0]}}class tc extends $a{constructor(){const t=ui(tc.getDefaults(),arguments,["size"]);super(t),this.name="Waveform",this._analyser.type="waveform",this.size=t.size}static getDefaults(){return Object.assign($a.getDefaults(),{size:1024})}getValue(){return this._analyser.getValue()}get size(){return this._analyser.size}set size(t){this._analyser.size=t}}class ec extends io{constructor(){const t=ui(ec.getDefaults(),arguments,["solo"]);super(t),this.name="Solo",this.input=this.output=new ho({context:this.context}),ec._allSolos.has(this.context)||ec._allSolos.set(this.context,new Set),ec._allSolos.get(this.context).add(this),this.solo=t.solo}static getDefaults(){return Object.assign(io.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(t){t?this._addSolo():this._removeSolo(),ec._allSolos.get(this.context).forEach((t=>t._updateSolo()))}get muted(){return 0===this.input.gain.value}_addSolo(){ec._soloed.has(this.context)||ec._soloed.set(this.context,new Set),ec._soloed.get(this.context).add(this)}_removeSolo(){ec._soloed.has(this.context)&&ec._soloed.get(this.context).delete(this)}_isSoloed(){return ec._soloed.has(this.context)&&ec._soloed.get(this.context).has(this)}_noSolos(){return!ec._soloed.has(this.context)||ec._soloed.has(this.context)&&0===ec._soloed.get(this.context).size}_updateSolo(){this._isSoloed()||this._noSolos()?this.input.gain.value=1:this.input.gain.value=0}dispose(){return super.dispose(),ec._allSolos.get(this.context).delete(this),this._removeSolo(),this}}ec._allSolos=new Map,ec._soloed=new Map;class sc extends io{constructor(){const t=ui(sc.getDefaults(),arguments,["pan","volume"]);super(t),this.name="PanVol",this._panner=this.input=new da({context:this.context,pan:t.pan,channelCount:t.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new xo({context:this.context,volume:t.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=t.mute,Di(this,["pan","volume"])}static getDefaults(){return Object.assign(io.getDefaults(),{mute:!1,pan:0,volume:0,channelCount:1})}get mute(){return this._volume.mute}set mute(t){this._volume.mute=t}dispose(){return super.dispose(),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this}}class nc extends io{constructor(){const t=ui(nc.getDefaults(),arguments,["volume","pan"]);super(t),this.name="Channel",this._solo=this.input=new ec({solo:t.solo,context:this.context}),this._panVol=this.output=new sc({context:this.context,pan:t.pan,volume:t.volume,mute:t.mute,channelCount:t.channelCount}),this.pan=this._panVol.pan,this.volume=this._panVol.volume,this._solo.connect(this._panVol),Di(this,["pan","volume"])}static getDefaults(){return Object.assign(io.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1,channelCount:1})}get solo(){return this._solo.solo}set solo(t){this._solo.solo=t}get muted(){return this._solo.muted||this.mute}get mute(){return this._panVol.mute}set mute(t){this._panVol.mute=t}_getBus(t){return nc.buses.has(t)||nc.buses.set(t,new ho({context:this.context})),nc.buses.get(t)}send(t,e=0){const s=this._getBus(t),n=new ho({context:this.context,units:"decibels",gain:e});return this.connect(n),n.connect(s),n}receive(t){return this._getBus(t).connect(this),this}dispose(){return super.dispose(),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this}}nc.buses=new Map;class ic extends io{constructor(){super(ui(ic.getDefaults(),arguments)),this.name="Mono",this.input=new ho({context:this.context}),this._merge=this.output=new ba({channels:2,context:this.context}),this.input.connect(this._merge,0,0),this.input.connect(this._merge,0,1)}dispose(){return super.dispose(),this._merge.dispose(),this.input.dispose(),this}}class oc extends io{constructor(){const t=ui(oc.getDefaults(),arguments,["lowFrequency","highFrequency"]);super(t),this.name="MultibandSplit",this