/* ----------------------------------------------------------------------------
 * 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: PAIO extends: IO fields: swigCPtrForPAIO {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGPAIOToIO: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForPAIO := newCPtr.
  ]

  Method [ getCPtrForPAIO
    ^swigCPtrForPAIO
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

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

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

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

  Function [ s_rate: s_rate b_size: b_size
    ^self fromPointer: (CslNI cslNI_new_PAIO__SWIG_1: s_rate, b_size) memoryOwn: true
  ]

  Function [ in_stream: in_stream out_stream: out_stream in_chans: in_chans out_chans: out_chans
    ^self fromPointer: (CslNI cslNI_new_PAIO__SWIG_2: in_stream, out_stream, in_chans, out_chans) memoryOwn: true
  ]

  Function [ s_rate: s_rate b_size: b_size in_device: in_device out_device: out_device in_chans: in_chans out_chans: out_chans
    ^self fromPointer: (CslNI cslNI_new_PAIO__SWIG_3: s_rate, b_size, (SwigTypePPaDeviceIndex getCPtr: in_device), (SwigTypePPaDeviceIndex getCPtr: out_device), in_chans, out_chans) memoryOwn: true
  ]

  Method [ open 
    CslNI cslNI_PAIO_open: swigCPtrForPAIO 
  ]

  Method [ start 
    CslNI cslNI_PAIO_start: swigCPtrForPAIO 
  ]

  Method [ stop 
    CslNI cslNI_PAIO_stop: swigCPtrForPAIO 
  ]

  Method [ close 
    CslNI cslNI_PAIO_close: swigCPtrForPAIO 
  ]

  Method [ test 
    CslNI cslNI_PAIO_test: swigCPtrForPAIO 
  ]

  Method [ getInput 
    ^Buffer fromPointer: CslNI cslNI_PAIO_getInput__SWIG_0: swigCPtrForPAIO  memoryOwn: false
  ]

  Method [ getInput: numFrames numChannels: numChannels 
    ^Buffer fromPointer: CslNI cslNI_PAIO_getInput__SWIG_1: swigCPtrForPAIO with: numFrames with: numChannels memoryOwn: false
  ]

  Method [ setMStream: mStream 
    CslNI cslNI_set_PAIO_mStream: swigCPtrForPAIO with: (SwigTypePPaStream getCPtr: mStream)
  ]

  Method [ getMStream 
    |cPtr|
    cPtr := CslNI cslNI_get_PAIO_mStream: swigCPtrForPAIO .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ SwigTypePPaStream fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMInputPointer: mInputPointer 
    CslNI cslNI_set_PAIO_mInputPointer: swigCPtrForPAIO with: (SwigTypePfloat getCPtr: mInputPointer)
  ]

  Method [ getMInputPointer 
    |cPtr|
    cPtr := CslNI cslNI_get_PAIO_mInputPointer: swigCPtrForPAIO .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ SwigTypePfloat fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMChannelMap: mChannelMap 
    CslNI cslNI_set_PAIO_mChannelMap: swigCPtrForPAIO with: (SwigTypePunsignedint getCPtr: mChannelMap)
  ]

  Method [ getMChannelMap 
    |cPtr|
    cPtr := CslNI cslNI_get_PAIO_mChannelMap: swigCPtrForPAIO .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ SwigTypePunsignedint fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setStatus: status 
    CslNI cslNI_set_PAIO_status: swigCPtrForPAIO with: status
  ]

  Method [ getStatus 
    ^CslNI cslNI_get_PAIO_status: swigCPtrForPAIO 
  ]

}
