/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version: 1.3.21
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


Class name: FFT extends: Effect fields: swigCPtrForFFT {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGFFTToEffect: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForFFT := newCPtr.
  ]

  Method [ getCPtrForFFT
    ^swigCPtrForFFT
  ]


  Function [ new
    self noDefaultConstructorError
  ]

  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

  Method [ delete 
    (swigCMemoryOwn and:[ swigCPtrForFFT ~~ 0 ]) ifTrue:[
      swigCMemoryOwn := false.
      CslNI cslNI_delete_FFT: swigCPtrForFFT.
    ].
    swigCPtrForFFT := 0.
    super delete.
  ]

  Function[ getCPtr: obj
     obj isNil ifTrue:[^0].
     ^obj getCPtrForFFT
  ]

  Function [ in: in type: type flags: flags size: size
    ^self fromPointer: (CslNI cslNI_new_FFT__SWIG_0: (UnitGenerator getCPtr: in), type, flags, size) memoryOwn: true
  ]

  Function [ in: in type: type flags: flags
    ^self fromPointer: (CslNI cslNI_new_FFT__SWIG_1: (UnitGenerator getCPtr: in), type, flags) memoryOwn: true
  ]

  Function [ in: in type: type
    ^self fromPointer: (CslNI cslNI_new_FFT__SWIG_2: (UnitGenerator getCPtr: in), type) memoryOwn: true
  ]

  Function [ in: in
    ^self fromPointer: (CslNI cslNI_new_FFT__SWIG_3: (UnitGenerator getCPtr: in)) memoryOwn: true
  ]

  Method [ fftSize 
    ^CslNI cslNI_FFT_fftSize: swigCPtrForFFT 
  ]

  Method [ nextBuffer: outputBuffer 
    CslNI cslNI_FFT_nextBuffer: swigCPtrForFFT with: (Buffer getCPtr: outputBuffer)
  ]

  Method [ setMCmplxSpectrum: mCmplxSpectrum 
    CslNI cslNI_set_FFT_mCmplxSpectrum: swigCPtrForFFT with: (SwigTypePfftwfcomplex getCPtr: mCmplxSpectrum)
  ]

  Method [ getMCmplxSpectrum 
    |cPtr|
    cPtr := CslNI cslNI_get_FFT_mCmplxSpectrum: swigCPtrForFFT .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ SwigTypePfftwfcomplex fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMRealSpectrum: mRealSpectrum 
    CslNI cslNI_set_FFT_mRealSpectrum: swigCPtrForFFT with: (SwigTypePfloat getCPtr: mRealSpectrum)
  ]

  Method [ getMRealSpectrum 
    |cPtr|
    cPtr := CslNI cslNI_get_FFT_mRealSpectrum: swigCPtrForFFT .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ SwigTypePfloat fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMOverwriteOutput: mOverwriteOutput 
    CslNI cslNI_set_FFT_mOverwriteOutput: swigCPtrForFFT with: mOverwriteOutput asBooleanParameter
  ]

  Method [ getMOverwriteOutput 
	^(CslNI cslNI_get_FFT_mOverwriteOutput: swigCPtrForFFT ) asBoolean
  ]

}
