     open var decimation: Double = 0.5 {
         didSet {
             decimation = (0...1).clamp(decimation)
-            AudioUnitSetParameter(
-                internalAU!,
-                kDistortionParam_Decimation,
-                kAudioUnitScope_Global, 0,
-                Float(decimation) * 100.0, 0)
+            au[kDistortionParam_Decimation] = decimation * 100
         }
     }
 

    open var rounding: Double = 0 {
        didSet {
            rounding = (0...1).clamp(rounding)
            AudioUnitSetParameter(
                internalAU!,
                kDistortionParam_Rounding,
                kAudioUnitScope_Global, 0,
                Float(rounding) * 100.0, 0)
        }
    }



    public static let ComponentDescription = AudioComponentDescription(appleEffect: kAudioUnitSubType_Distortion)

    private var internalEffect = AVAudioUnitEffect()
    private var au: AUWrapper

    fileprivate var lastKnownMix: Double = 1

