/* ----------------------------------------------------------------------------
 * 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: DelayLine extends: Effect fields: swigCPtrForDelayLine {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGDelayLineToEffect: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForDelayLine := newCPtr.
  ]

  Method [ getCPtrForDelayLine
    ^swigCPtrForDelayLine
  ]


  Function [ new
    self noDefaultConstructorError
  ]

  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

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

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

  Function [ maxDelayInSamples: maxDelayInSamples
    ^self fromPointer: (CslNI cslNI_new_DelayLine: maxDelayInSamples) memoryOwn: true
  ]

  Method [ delayTime 
    ^CslNI cslNI_DelayLine_delayTime: swigCPtrForDelayLine 
  ]

  Method [ delayLength 
    ^CslNI cslNI_DelayLine_delayLength: swigCPtrForDelayLine 
  ]

  Method [ setDelayTime: delayInMiliseconds 
    ^CslNI cslNI_DelayLine_setDelayTime: swigCPtrForDelayLine with: delayInMiliseconds
  ]

  Method [ setDelayLength: delayInSamples 
    ^CslNI cslNI_DelayLine_setDelayLength: swigCPtrForDelayLine with: delayInSamples
  ]

  Method [ nextBuffer: output 
    CslNI cslNI_DelayLine_nextBuffer: swigCPtrForDelayLine with: (Buffer getCPtr: output)
  ]

}
