/* ----------------------------------------------------------------------------
 * 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: ADSR extends: Envelope fields: swigCPtrForADSR {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGADSRToEnvelope: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForADSR := newCPtr.
  ]

  Method [ getCPtrForADSR
    ^swigCPtrForADSR
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

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

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

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

  Function [ t: t a: a d: d s: s r: r
    ^self fromPointer: (CslNI cslNI_new_ADSR__SWIG_1: t, a, d, s, r) memoryOwn: true
  ]

  Function [ t: t i: i a: a d: d s: s r: r
    ^self fromPointer: (CslNI cslNI_new_ADSR__SWIG_2: t, i, a, d, s, r) memoryOwn: true
  ]

  Method [ setAttack: attack 
    CslNI cslNI_ADSR_setAttack: swigCPtrForADSR with: attack
  ]

  Method [ setDecay: decay 
    CslNI cslNI_ADSR_setDecay: swigCPtrForADSR with: decay
  ]

  Method [ setSustain: sustain 
    CslNI cslNI_ADSR_setSustain: swigCPtrForADSR with: sustain
  ]

  Method [ setRelease: release 
    CslNI cslNI_ADSR_setRelease: swigCPtrForADSR with: release
  ]

  Method [ release 
    CslNI cslNI_ADSR_release: swigCPtrForADSR 
  ]

}
