     open var releaseTime: Double = 0.05 {
         didSet {
             releaseTime = (0.01...3).clamp(releaseTime)
-            AudioUnitSetParameter(
-                internalAU!,
-                kDynamicsProcessorParam_ReleaseTime,
-                kAudioUnitScope_Global, 0,
-                Float(releaseTime), 0)
+            au[kDynamicsProcessorParam_ReleaseTime] = releaseTime
         }
     }
 

    open var expansionThreshold: Double = 2 {
        didSet {
            expansionThreshold = (1...50).clamp(expansionThreshold)
            AudioUnitSetParameter(
                internalAU!,
                kDynamicsProcessorParam_ExpansionThreshold,
                kAudioUnitScope_Global, 0,
                Float(expansionThreshold), 0)
        }
    }



    public static let ComponentDescription = AudioComponentDescription(appleEffect: kAudioUnitSubType_DynamicsProcessor)

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

    private var internalCompressionAmount:AudioUnitParameterValue = 0.0
    private var internalInputAmplitude:AudioUnitParameterValue = 0.0
    private var internalOutputAmplitude:AudioUnitParameterValue = 0.0

    /// Expansion Ratio (rate) ranges from 1 to 50.0 (Default: 2)
    open var expansionRatio: Double = 2 {
        didSet {
            expansionRatio = (1...50).clamp(expansionRatio)
            au[kDynamicsProcessorParam_ExpansionRatio] = expansionRatio
        }
    }

