         var scale: Float = 4.0 // 4.0 * Float(length)
         vDSP_vsdiv(&output, 1, &scale, &output, 1, UInt(halfLength))
         
-        // TODO: add appropriate scaling based on window
-        
         return output
     }
     

        // free the FFT setup
        vDSP_destroy_fftsetup(fftSetup)
        
        // free the window
        window.destroy()
        window.dealloc(length)

    
    func resetWindow() {
        windowType.createWindow(window, len: length)
    }
    
    func appendData(data: UnsafeMutablePointer<Float>, withSamples numSamples: Int) {
