/* ----------------------------------------------------------------------------
 * 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: IO extends: SwigProxy fields: swigCPtrForIO, swigCMemoryOwn {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    swigCMemoryOwn := newCMemoryOwn.
    swigCPtrForIO := newCPtr.
  ]

  Method [ getCPtrForIO
    ^swigCPtrForIO
  ]


  Function [ new
    self noDefaultConstructorError
  ]

  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

  Method [ delete 
    (swigCMemoryOwn and:[ swigCPtrForIO ~~ 0 ]) ifTrue:[
      swigCMemoryOwn := false.
      CslNI cslNI_delete_IO: swigCPtrForIO.
    ].
    swigCPtrForIO := 0.
  ]

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

  Method [ open 
    CslNI cslNI_IO_open: swigCPtrForIO 
  ]

  Method [ close 
    CslNI cslNI_IO_close: swigCPtrForIO 
  ]

  Method [ start 
    CslNI cslNI_IO_start: swigCPtrForIO 
  ]

  Method [ stop 
    CslNI cslNI_IO_stop: swigCPtrForIO 
  ]

  Method [ setRoot: root 
    CslNI cslNI_IO_setRoot: swigCPtrForIO with: (UnitGenerator getCPtr: root)
  ]

  Method [ clearRoot 
    CslNI cslNI_IO_clearRoot: swigCPtrForIO 
  ]

  Method [ getInput 
    ^Buffer fromPointer: CslNI cslNI_IO_getInput__SWIG_0: swigCPtrForIO  memoryOwn: false
  ]

  Method [ getInput: numFrames numChannels: numChannels 
    ^Buffer fromPointer: CslNI cslNI_IO_getInput__SWIG_1: swigCPtrForIO with: numFrames with: numChannels memoryOwn: false
  ]

  Method [ getAndIncrementSequence 
    ^CslNI cslNI_IO_getAndIncrementSequence: swigCPtrForIO 
  ]

  Method [ setMGraph: mGraph 
    CslNI cslNI_set_IO_mGraph: swigCPtrForIO with: (UnitGenerator getCPtr: mGraph)
  ]

  Method [ getMGraph 
    |cPtr|
    cPtr := CslNI cslNI_get_IO_mGraph: swigCPtrForIO .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ UnitGenerator fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMInputBuffer: mInputBuffer 
    CslNI cslNI_set_IO_mInputBuffer: swigCPtrForIO with: (Buffer getCPtr: mInputBuffer)
  ]

  Method [ getMInputBuffer 
    |cPtr|
    cPtr := CslNI cslNI_get_IO_mInputBuffer: swigCPtrForIO .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ Buffer fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMOutputBuffer: mOutputBuffer 
    CslNI cslNI_set_IO_mOutputBuffer: swigCPtrForIO with: (Buffer getCPtr: mOutputBuffer)
  ]

  Method [ getMOutputBuffer 
    |cPtr|
    cPtr := CslNI cslNI_get_IO_mOutputBuffer: swigCPtrForIO .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ Buffer fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMNumFramesPlayed: mNumFramesPlayed 
    CslNI cslNI_set_IO_mNumFramesPlayed: swigCPtrForIO with: mNumFramesPlayed
  ]

  Method [ getMNumFramesPlayed 
    ^CslNI cslNI_get_IO_mNumFramesPlayed: swigCPtrForIO 
  ]

  Method [ setMSequence: mSequence 
    CslNI cslNI_set_IO_mSequence: swigCPtrForIO with: mSequence
  ]

  Method [ getMSequence 
    ^CslNI cslNI_get_IO_mSequence: swigCPtrForIO 
  ]

  Method [ setMLoggingPeriod: mLoggingPeriod 
    CslNI cslNI_set_IO_mLoggingPeriod: swigCPtrForIO with: mLoggingPeriod
  ]

  Method [ getMLoggingPeriod 
    ^CslNI cslNI_get_IO_mLoggingPeriod: swigCPtrForIO 
  ]

  Method [ setMNumInChannels: mNumInChannels 
    CslNI cslNI_set_IO_mNumInChannels: swigCPtrForIO with: mNumInChannels
  ]

  Method [ getMNumInChannels 
    ^CslNI cslNI_get_IO_mNumInChannels: swigCPtrForIO 
  ]

  Method [ setMNumOutChannels: mNumOutChannels 
    CslNI cslNI_set_IO_mNumOutChannels: swigCPtrForIO with: mNumOutChannels
  ]

  Method [ getMNumOutChannels 
    ^CslNI cslNI_get_IO_mNumOutChannels: swigCPtrForIO 
  ]

  Method [ setMNumRealInChannels: mNumRealInChannels 
    CslNI cslNI_set_IO_mNumRealInChannels: swigCPtrForIO with: mNumRealInChannels
  ]

  Method [ getMNumRealInChannels 
    ^CslNI cslNI_get_IO_mNumRealInChannels: swigCPtrForIO 
  ]

  Method [ setMNumRealOutChannels: mNumRealOutChannels 
    CslNI cslNI_set_IO_mNumRealOutChannels: swigCPtrForIO with: mNumRealOutChannels
  ]

  Method [ getMNumRealOutChannels 
    ^CslNI cslNI_get_IO_mNumRealOutChannels: swigCPtrForIO 
  ]

  Method [ setMThen: mThen 
    CslNI cslNI_set_IO_mThen: swigCPtrForIO with: (SwigTypePtimeval getCPtr: mThen)
  ]

  Method [ getMThen 
    ^SwigTypePtimeval fromPointer: CslNI cslNI_get_IO_mThen: swigCPtrForIO  memoryOwn: true
  ]

  Method [ setMNow: mNow 
    CslNI cslNI_set_IO_mNow: swigCPtrForIO with: (SwigTypePtimeval getCPtr: mNow)
  ]

  Method [ getMNow 
    ^SwigTypePtimeval fromPointer: CslNI cslNI_get_IO_mNow: swigCPtrForIO  memoryOwn: true
  ]

  Method [ setMTimeVals: mTimeVals 
    CslNI cslNI_set_IO_mTimeVals: swigCPtrForIO with: mTimeVals
  ]

  Method [ getMTimeVals 
    ^CslNI cslNI_get_IO_mTimeVals: swigCPtrForIO 
  ]

  Method [ setMThisSec: mThisSec 
    CslNI cslNI_set_IO_mThisSec: swigCPtrForIO with: mThisSec
  ]

  Method [ getMThisSec 
    ^CslNI cslNI_get_IO_mThisSec: swigCPtrForIO 
  ]

  Method [ setMTimeSum: mTimeSum 
    CslNI cslNI_set_IO_mTimeSum: swigCPtrForIO with: mTimeSum
  ]

  Method [ getMTimeSum 
    ^CslNI cslNI_get_IO_mTimeSum: swigCPtrForIO 
  ]

  Method [ printTimeStatistics: tthen tnow: tnow tsecond: tsecond ttimeSum: ttimeSum ttimeVals: ttimeVals 
    CslNI cslNI_IO_printTimeStatistics: swigCPtrForIO with: (SwigTypePtimeval getCPtr: tthen) with: (SwigTypePtimeval getCPtr: tnow) with: (SwigTypePlong getCPtr: tsecond) with: (SwigTypePlong getCPtr: ttimeSum) with: (SwigTypePlong getCPtr: ttimeVals)
  ]

}
