     /// - parameter input: Node to analyze
     /// - parameter bufferSize: Size of buffer to analyze
     /// - parameter handler: Code to call with new amplitudes
-    public init(_ input: Node, bufferSize: UInt32 = 1_024, handler: @escaping (Float) -> Void = { _ in }) {
+    /// - parameter mode: rms or peak returned amplitudes
+    public init(_ input: Node, bufferSize: UInt32 = 1_024, mode: AnalysisMode = .rms, handler: @escaping (Float) -> Void = { _ in }) {
         self.handler = handler
+        self.mode = mode
         super.init(input, bufferSize: bufferSize)
     }
 

    public var rightAmplitude: Float {
        return amp[1]
    }

    private var handler: (Float) -> Void = { _ in }


        amp[1] = 0
    }
}

public enum AnalysisMode {
    case rms
    case peak
}
