/* ----------------------------------------------------------------------------
 * 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: KarplusString extends: UnitGenerator fields: swigCPtrForKarplusString {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGKarplusStringToUnitGenerator: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForKarplusString := newCPtr.
  ]

  Method [ getCPtrForKarplusString
    ^swigCPtrForKarplusString
  ]


  Function [ new
    self noDefaultConstructorError
  ]

  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

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

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

  Method [ setMDelayLine: mDelayLine 
    CslNI cslNI_set_KarplusString_mDelayLine: swigCPtrForKarplusString with: (Buffer getCPtr: mDelayLine)
  ]

  Method [ getMDelayLine 
    |cPtr|
    cPtr := CslNI cslNI_get_KarplusString_mDelayLine: swigCPtrForKarplusString .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ Buffer fromPointer: cPtr memoryOwn: false ]
  ]

  Function [ frequency: frequency
    ^self fromPointer: (CslNI cslNI_new_KarplusString: frequency) memoryOwn: true
  ]

  Method [ trigger 
    CslNI cslNI_KarplusString_trigger: swigCPtrForKarplusString 
  ]

  Method [ dump 
    CslNI cslNI_KarplusString_dump: swigCPtrForKarplusString 
  ]

}
