/* ----------------------------------------------------------------------------
 * 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: WavetableOscillator extends: Oscillator fields: swigCPtrForWavetableOscillator {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGWavetableOscillatorToOscillator: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForWavetableOscillator := newCPtr.
  ]

  Method [ getCPtrForWavetableOscillator
    ^swigCPtrForWavetableOscillator
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

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

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

  Function [ wave: wave
    ^self fromPointer: (CslNI cslNI_new_WavetableOscillator__SWIG_0: (Buffer getCPtr: wave)) memoryOwn: true
  ]

  Function [ samps: samps size: size
    ^self fromPointer: (CslNI cslNI_new_WavetableOscillator__SWIG_1: (SwigTypePfloat getCPtr: samps), size) memoryOwn: true
  ]

  Function [ wave: wave frequency: frequency
    ^self fromPointer: (CslNI cslNI_new_WavetableOscillator__SWIG_2: (Buffer getCPtr: wave), frequency) memoryOwn: true
  ]

  Function [ wave: wave frequency: frequency phase: phase
    ^self fromPointer: (CslNI cslNI_new_WavetableOscillator__SWIG_3: (Buffer getCPtr: wave), frequency, phase) memoryOwn: true
  ]

  Function [ frequency: frequency ampl: ampl offset: offset phase: phase
    ^self fromPointer: (CslNI cslNI_new_WavetableOscillator__SWIG_4: frequency, ampl, offset, phase) memoryOwn: true
  ]

  Function [ frequency: frequency ampl: ampl offset: offset
    ^self fromPointer: (CslNI cslNI_new_WavetableOscillator__SWIG_5: frequency, ampl, offset) memoryOwn: true
  ]

  Function [ frequency: frequency ampl: ampl
    ^self fromPointer: (CslNI cslNI_new_WavetableOscillator__SWIG_6: frequency, ampl) memoryOwn: true
  ]

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

  Function [ new
    ^self fromPointer: (CslNI cslNI_new_WavetableOscillator__SWIG_8) memoryOwn: true
  ]

  Method [ setWaveform: wave 
    CslNI cslNI_WavetableOscillator_setWaveform__SWIG_0: swigCPtrForWavetableOscillator with: (Buffer getCPtr: wave)
  ]

  Method [ setWaveform: samps size: size 
    CslNI cslNI_WavetableOscillator_setWaveform__SWIG_1: swigCPtrForWavetableOscillator with: (SwigTypePfloat getCPtr: samps) with: size
  ]

  Method [ setInterpolate: whether 
    CslNI cslNI_WavetableOscillator_setInterpolate: swigCPtrForWavetableOscillator with: whether
  ]

  Method [ nextBuffer: outputBuffer outBufNum: outBufNum 
    CslNI cslNI_WavetableOscillator_nextBuffer: swigCPtrForWavetableOscillator with: (Buffer getCPtr: outputBuffer) with: outBufNum
  ]

}
