/* ----------------------------------------------------------------------------
 * 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: Envelope extends: UnitGenerator fields: swigCPtrForEnvelope {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGEnvelopeToUnitGenerator: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForEnvelope := newCPtr.
  ]

  Method [ getCPtrForEnvelope
    ^swigCPtrForEnvelope
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

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

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

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

  Function [ t: t x1: x1 y1: y1 x2: x2 y2: y2 x3: x3 y3: y3 x4: x4 y4: y4 x5: x5 y5: y5 x6: x6 y6: y6
    ^self fromPointer: (CslNI cslNI_new_Envelope__SWIG_1: t, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6) memoryOwn: true
  ]

  Function [ t: t x1: x1 y1: y1 x2: x2 y2: y2 x3: x3 y3: y3 x4: x4 y4: y4 x5: x5 y5: y5 x6: x6
    ^self fromPointer: (CslNI cslNI_new_Envelope__SWIG_2: t, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6) memoryOwn: true
  ]

  Function [ t: t x1: x1 y1: y1 x2: x2 y2: y2 x3: x3 y3: y3 x4: x4 y4: y4 x5: x5 y5: y5
    ^self fromPointer: (CslNI cslNI_new_Envelope__SWIG_3: t, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5) memoryOwn: true
  ]

  Function [ t: t x1: x1 y1: y1 x2: x2 y2: y2 x3: x3 y3: y3 x4: x4 y4: y4 x5: x5
    ^self fromPointer: (CslNI cslNI_new_Envelope__SWIG_4: t, x1, y1, x2, y2, x3, y3, x4, y4, x5) memoryOwn: true
  ]

  Function [ t: t x1: x1 y1: y1 x2: x2 y2: y2 x3: x3 y3: y3 x4: x4 y4: y4
    ^self fromPointer: (CslNI cslNI_new_Envelope__SWIG_5: t, x1, y1, x2, y2, x3, y3, x4, y4) memoryOwn: true
  ]

  Function [ t: t x1: x1 y1: y1 x2: x2 y2: y2 x3: x3 y3: y3 x4: x4
    ^self fromPointer: (CslNI cslNI_new_Envelope__SWIG_6: t, x1, y1, x2, y2, x3, y3, x4) memoryOwn: true
  ]

  Function [ t: t x1: x1 y1: y1 x2: x2 y2: y2 x3: x3 y3: y3
    ^self fromPointer: (CslNI cslNI_new_Envelope__SWIG_7: t, x1, y1, x2, y2, x3, y3) memoryOwn: true
  ]

  Function [ t: t x1: x1 y1: y1 x2: x2 y2: y2 x3: x3
    ^self fromPointer: (CslNI cslNI_new_Envelope__SWIG_8: t, x1, y1, x2, y2, x3) memoryOwn: true
  ]

  Function [ t: t x1: x1 y1: y1 x2: x2 y2: y2
    ^self fromPointer: (CslNI cslNI_new_Envelope__SWIG_9: t, x1, y1, x2, y2) memoryOwn: true
  ]

  Function [ t: t x1: x1 y1: y1 x2: x2
    ^self fromPointer: (CslNI cslNI_new_Envelope__SWIG_10: t, x1, y1, x2) memoryOwn: true
  ]

  Function [ t: t x1: x1 y1: y1
    ^self fromPointer: (CslNI cslNI_new_Envelope__SWIG_11: t, x1, y1) memoryOwn: true
  ]

  Function [ t: t size: size x: x y: y
    ^self fromPointer: (CslNI cslNI_new_Envelope__SWIG_12: t, size, (SwigTypePdouble getCPtr: x), (SwigTypePdouble getCPtr: y)) memoryOwn: true
  ]

  Method [ isActive 
	^(CslNI cslNI_Envelope_isActive: swigCPtrForEnvelope ) asBoolean
  ]

  Method [ addBreakpoint: startTime value: value 
    CslNI cslNI_Envelope_addBreakpoint: swigCPtrForEnvelope with: startTime with: value
  ]

  Method [ setInterpolationAtSegment: mode idx: idx 
    CslNI cslNI_Envelope_setInterpolationAtSegment: swigCPtrForEnvelope with: mode with: idx
  ]

  Method [ setDuration: d 
    CslNI cslNI_Envelope_setDuration: swigCPtrForEnvelope with: d
  ]

  Method [ scaleTimes: s 
    CslNI cslNI_Envelope_scaleTimes: swigCPtrForEnvelope with: s
  ]

  Method [ reset 
    CslNI cslNI_Envelope_reset: swigCPtrForEnvelope 
  ]

  Method [ trigger 
    CslNI cslNI_Envelope_trigger: swigCPtrForEnvelope 
  ]

  Method [ dump 
    CslNI cslNI_Envelope_dump: swigCPtrForEnvelope 
  ]

  Method [ nextBuffer: outputBuffer outBufNum: outBufNum 
    CslNI cslNI_Envelope_nextBuffer: swigCPtrForEnvelope with: (Buffer getCPtr: outputBuffer) with: outBufNum
  ]

}
