/* ----------------------------------------------------------------------------
 * 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: BufferCMap extends: Buffer fields: swigCPtrForBufferCMap {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGBufferCMapToBuffer: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForBufferCMap := newCPtr.
  ]

  Method [ getCPtrForBufferCMap
    ^swigCPtrForBufferCMap
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

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

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

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

  Function [ numChannels: numChannels numFrames: numFrames
    ^self fromPointer: (CslNI cslNI_new_BufferCMap__SWIG_1: numChannels, numFrames) memoryOwn: true
  ]

  Function [ numChannels: numChannels realNumChannels: realNumChannels numFrames: numFrames
    ^self fromPointer: (CslNI cslNI_new_BufferCMap__SWIG_2: numChannels, realNumChannels, numFrames) memoryOwn: true
  ]

  Method [ setMRealNumChannels: mRealNumChannels 
    CslNI cslNI_set_BufferCMap_mRealNumChannels: swigCPtrForBufferCMap with: mRealNumChannels
  ]

  Method [ getMRealNumChannels 
    ^CslNI cslNI_get_BufferCMap_mRealNumChannels: swigCPtrForBufferCMap 
  ]

  Method [ setMChannelMap: mChannelMap 
    CslNI cslNI_set_BufferCMap_mChannelMap: swigCPtrForBufferCMap with: (SwigTypePstdvectorTunsignedintstdallocatorTunsignedinttt getCPtr: mChannelMap)
  ]

  Method [ getMChannelMap 
    |cPtr|
    cPtr := CslNI cslNI_get_BufferCMap_mChannelMap: swigCPtrForBufferCMap .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ SwigTypePstdvectorTunsignedintstdallocatorTunsignedinttt fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ monoBuffer: bufNum 
    |cPtr|
    cPtr := CslNI cslNI_BufferCMap_monoBuffer: swigCPtrForBufferCMap with: bufNum.
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ SwigTypePfloat fromPointer: cPtr memoryOwn: false ]
  ]

}
