private void CheckIfFilterIsEnabled() { bool active = false; dsphighpass.getActive(ref active); if (!highPassFilterEnabled && active) { dsphighpass.remove(); } if (highPassFilterEnabled && !active) { _audioSystem.SystemObject.addDSP(dsphighpass, ref dspconnectiontemp); } active = false; dsplowpass.getActive(ref active); if (!lowPassFilterEnabled && active) { dsplowpass.remove(); } if (lowPassFilterEnabled && !active) { _audioSystem.SystemObject.addDSP(dsplowpass, ref dspconnectiontemp); } }