/* ----------------------------------------------------------------------------
 * 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: SoundFile extends: UnitGenerator fields: swigCPtrForSoundFile {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGSoundFileToUnitGenerator: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForSoundFile := newCPtr.
  ]

  Method [ getCPtrForSoundFile
    ^swigCPtrForSoundFile
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

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

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

  Function [ path: path
    ^self fromPointer: (CslNI cslNI_new_SoundFile__SWIG_0: path asNullTermStringParameter) memoryOwn: true
  ]

  Function [ path: path start: start stop: stop
    ^self fromPointer: (CslNI cslNI_new_SoundFile__SWIG_1: (SwigTypePstring getCPtr: path), start, stop) memoryOwn: true
  ]

  Function [ path: path start: start
    ^self fromPointer: (CslNI cslNI_new_SoundFile__SWIG_2: (SwigTypePstring getCPtr: path), start) memoryOwn: true
  ]

  Function [ path: path
    ^self fromPointer: (CslNI cslNI_new_SoundFile__SWIG_3: (SwigTypePstring getCPtr: path)) memoryOwn: true
  ]

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

  Method [ setMPath: mPath 
    CslNI cslNI_set_SoundFile_mPath: swigCPtrForSoundFile with: (SwigTypePstring getCPtr: mPath)
  ]

  Method [ getMPath 
    ^SwigTypePstring fromPointer: CslNI cslNI_get_SoundFile_mPath: swigCPtrForSoundFile  memoryOwn: true
  ]

  Method [ setMMode: mMode 
    CslNI cslNI_set_SoundFile_mMode: swigCPtrForSoundFile with: mMode
  ]

  Method [ getMMode 
    ^CslNI cslNI_get_SoundFile_mMode: swigCPtrForSoundFile 
  ]

  Method [ setMSFInfo: mSFInfo 
    CslNI cslNI_set_SoundFile_mSFInfo: swigCPtrForSoundFile with: (SwigTypePSFINFO getCPtr: mSFInfo)
  ]

  Method [ getMSFInfo 
    ^SwigTypePSFINFO fromPointer: CslNI cslNI_get_SoundFile_mSFInfo: swigCPtrForSoundFile  memoryOwn: true
  ]

  Method [ setMSndfile: mSndfile 
    CslNI cslNI_set_SoundFile_mSndfile: swigCPtrForSoundFile with: (SwigTypePSNDFILE getCPtr: mSndfile)
  ]

  Method [ getMSndfile 
    |cPtr|
    cPtr := CslNI cslNI_get_SoundFile_mSndfile: swigCPtrForSoundFile .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ SwigTypePSNDFILE fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMSampleBuffer: mSampleBuffer 
    CslNI cslNI_set_SoundFile_mSampleBuffer: swigCPtrForSoundFile with: (Buffer getCPtr: mSampleBuffer)
  ]

  Method [ getMSampleBuffer 
    |cPtr|
    cPtr := CslNI cslNI_get_SoundFile_mSampleBuffer: swigCPtrForSoundFile .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ Buffer fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ channels 
    ^CslNI cslNI_SoundFile_channels: swigCPtrForSoundFile 
  ]

  Method [ rate 
    ^CslNI cslNI_SoundFile_rate: swigCPtrForSoundFile 
  ]

  Method [ duration 
    ^CslNI cslNI_SoundFile_duration: swigCPtrForSoundFile 
  ]

  Method [ durationInSecs 
    ^CslNI cslNI_SoundFile_durationInSecs: swigCPtrForSoundFile 
  ]

  Method [ format 
    ^CslNI cslNI_SoundFile_format: swigCPtrForSoundFile 
  ]

  Method [ isValid 
	^(CslNI cslNI_SoundFile_isValid: swigCPtrForSoundFile ) asBoolean
  ]

  Method [ startFrame 
    ^CslNI cslNI_SoundFile_startFrame: swigCPtrForSoundFile 
  ]

  Method [ setStart: val 
    CslNI cslNI_SoundFile_setStart: swigCPtrForSoundFile with: val
  ]

  Method [ setStartSec: val 
    CslNI cslNI_SoundFile_setStartSec: swigCPtrForSoundFile with: val
  ]

  Method [ setStartRatio: val 
    CslNI cslNI_SoundFile_setStartRatio: swigCPtrForSoundFile with: val
  ]

  Method [ stopFrame 
    ^CslNI cslNI_SoundFile_stopFrame: swigCPtrForSoundFile 
  ]

  Method [ setStop: val 
    CslNI cslNI_SoundFile_setStop: swigCPtrForSoundFile with: val
  ]

  Method [ setStopSec: val 
    CslNI cslNI_SoundFile_setStopSec: swigCPtrForSoundFile with: val
  ]

  Method [ setStopRatio: val 
    CslNI cslNI_SoundFile_setStopRatio: swigCPtrForSoundFile with: val
  ]

  Method [ isLooping 
	^(CslNI cslNI_SoundFile_isLooping: swigCPtrForSoundFile ) asBoolean
  ]

  Method [ setIsLooping: isLooping 
    CslNI cslNI_SoundFile_setIsLooping: swigCPtrForSoundFile with: isLooping asBooleanParameter
  ]

  Method [ isActive 
	^(CslNI cslNI_SoundFile_isActive: swigCPtrForSoundFile ) asBoolean
  ]

  Method [ setPath: path 
    CslNI cslNI_SoundFile_setPath: swigCPtrForSoundFile with: (SwigTypePstring getCPtr: path)
  ]

  Method [ openForRead 
    CslNI cslNI_SoundFile_openForRead: swigCPtrForSoundFile 
  ]

  Method [ openForWrite: format channels: channels rate: rate bitDepth: bitDepth 
    CslNI cslNI_SoundFile_openForWrite__SWIG_0: swigCPtrForSoundFile with: format with: channels with: rate with: bitDepth
  ]

  Method [ openForWrite: format channels: channels rate: rate 
    CslNI cslNI_SoundFile_openForWrite__SWIG_1: swigCPtrForSoundFile with: format with: channels with: rate
  ]

  Method [ openForWrite: format channels: channels 
    CslNI cslNI_SoundFile_openForWrite__SWIG_2: swigCPtrForSoundFile with: format with: channels
  ]

  Method [ openForWrite: format 
    CslNI cslNI_SoundFile_openForWrite__SWIG_3: swigCPtrForSoundFile with: format
  ]

  Method [ openForWrite 
    CslNI cslNI_SoundFile_openForWrite__SWIG_4: swigCPtrForSoundFile 
  ]

  Method [ openForReadWrite 
    CslNI cslNI_SoundFile_openForReadWrite: swigCPtrForSoundFile 
  ]

  Method [ seekTo: position whence: whence 
    ^CslNI cslNI_SoundFile_seekTo__SWIG_0: swigCPtrForSoundFile with: position with: whence
  ]

  Method [ seekTo: position 
    ^CslNI cslNI_SoundFile_seekTo__SWIG_1: swigCPtrForSoundFile with: position
  ]

  Method [ readBufferFromFile: numFrames 
    CslNI cslNI_SoundFile_readBufferFromFile: swigCPtrForSoundFile with: numFrames
  ]

  Method [ setToEnd 
    CslNI cslNI_SoundFile_setToEnd: swigCPtrForSoundFile 
  ]

  Method [ trigger 
    CslNI cslNI_SoundFile_trigger: swigCPtrForSoundFile 
  ]

  Method [ close 
    CslNI cslNI_SoundFile_close: swigCPtrForSoundFile 
  ]

  Method [ freeBuffer 
    CslNI cslNI_SoundFile_freeBuffer: swigCPtrForSoundFile 
  ]

  Method [ nextBuffer: outputBuffer 
    CslNI cslNI_SoundFile_nextBuffer: swigCPtrForSoundFile with: (Buffer getCPtr: outputBuffer)
  ]

  Method [ writeBuffer: inputBuffer 
    CslNI cslNI_SoundFile_writeBuffer: swigCPtrForSoundFile with: (Buffer getCPtr: inputBuffer)
  ]

}
