/* ----------------------------------------------------------------------------
 * 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: SoundCue extends: UnitGenerator fields: swigCPtrForSoundCue {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGSoundCueToUnitGenerator: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForSoundCue := newCPtr.
  ]

  Method [ getCPtrForSoundCue
    ^swigCPtrForSoundCue
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

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

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

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

  Function [ name: name file: file start: start stop: stop
    ^self fromPointer: (CslNI cslNI_new_SoundCue__SWIG_1: (SwigTypePstring getCPtr: name), (SoundFile getCPtr: file), start, stop) memoryOwn: true
  ]

  Function [ name: name file: file start: start
    ^self fromPointer: (CslNI cslNI_new_SoundCue__SWIG_2: (SwigTypePstring getCPtr: name), (SoundFile getCPtr: file), start) memoryOwn: true
  ]

  Function [ name: name file: file
    ^self fromPointer: (CslNI cslNI_new_SoundCue__SWIG_3: (SwigTypePstring getCPtr: name), (SoundFile getCPtr: file)) memoryOwn: true
  ]

  Function [ name: name
    ^self fromPointer: (CslNI cslNI_new_SoundCue__SWIG_4: (SwigTypePstring getCPtr: name)) memoryOwn: true
  ]

  Method [ setMName: mName 
    CslNI cslNI_set_SoundCue_mName: swigCPtrForSoundCue with: (SwigTypePstring getCPtr: mName)
  ]

  Method [ getMName 
    ^SwigTypePstring fromPointer: CslNI cslNI_get_SoundCue_mName: swigCPtrForSoundCue  memoryOwn: true
  ]

  Method [ setMFile: mFile 
    CslNI cslNI_set_SoundCue_mFile: swigCPtrForSoundCue with: (SoundFile getCPtr: mFile)
  ]

  Method [ getMFile 
    |cPtr|
    cPtr := CslNI cslNI_get_SoundCue_mFile: swigCPtrForSoundCue .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ SoundFile fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMStart: mStart 
    CslNI cslNI_set_SoundCue_mStart: swigCPtrForSoundCue with: mStart
  ]

  Method [ getMStart 
    ^CslNI cslNI_get_SoundCue_mStart: swigCPtrForSoundCue 
  ]

  Method [ setMStop: mStop 
    CslNI cslNI_set_SoundCue_mStop: swigCPtrForSoundCue with: mStop
  ]

  Method [ getMStop 
    ^CslNI cslNI_get_SoundCue_mStop: swigCPtrForSoundCue 
  ]

  Method [ setMCurrent: mCurrent 
    CslNI cslNI_set_SoundCue_mCurrent: swigCPtrForSoundCue with: mCurrent
  ]

  Method [ getMCurrent 
    ^CslNI cslNI_get_SoundCue_mCurrent: swigCPtrForSoundCue 
  ]

  Method [ setMReadRate: mReadRate 
    CslNI cslNI_set_SoundCue_mReadRate: swigCPtrForSoundCue with: (UnitGenerator getCPtr: mReadRate)
  ]

  Method [ getMReadRate 
    |cPtr|
    cPtr := CslNI cslNI_get_SoundCue_mReadRate: swigCPtrForSoundCue .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ UnitGenerator fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ readFrom: input 
    CslNI cslNI_SoundCue_readFrom: swigCPtrForSoundCue with: (SwigTypePFILE getCPtr: input)
  ]

  Method [ dump 
    CslNI cslNI_SoundCue_dump: swigCPtrForSoundCue 
  ]

  Method [ nextBuffer: outputBuffer 
    CslNI cslNI_SoundCue_nextBuffer: swigCPtrForSoundCue with: (Buffer getCPtr: outputBuffer)
  ]

  Method [ isActive 
	^(CslNI cslNI_SoundCue_isActive: swigCPtrForSoundCue ) asBoolean
  ]

  Method [ channels 
    ^CslNI cslNI_SoundCue_channels: swigCPtrForSoundCue 
  ]

  Method [ setToEnd 
    CslNI cslNI_SoundCue_setToEnd: swigCPtrForSoundCue 
  ]

  Method [ trigger 
    CslNI cslNI_SoundCue_trigger: swigCPtrForSoundCue 
  ]

  Method [ duration 
    ^CslNI cslNI_SoundCue_duration: swigCPtrForSoundCue 
  ]

}
