/* ----------------------------------------------------------------------------
 * 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: BlockResizer extends: Effect fields: swigCPtrForBlockResizer {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGBlockResizerToEffect: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForBlockResizer := newCPtr.
  ]

  Method [ getCPtrForBlockResizer
    ^swigCPtrForBlockResizer
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

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

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

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

  Function [ quantum: quantum
    ^self fromPointer: (CslNI cslNI_new_BlockResizer__SWIG_1: quantum) memoryOwn: true
  ]

  Function [ input: input quantum: quantum
    ^self fromPointer: (CslNI cslNI_new_BlockResizer__SWIG_2: (UnitGenerator getCPtr: input), quantum) memoryOwn: true
  ]

  Method [ setMFrameQuantum: mFrameQuantum 
    CslNI cslNI_set_BlockResizer_mFrameQuantum: swigCPtrForBlockResizer with: mFrameQuantum
  ]

  Method [ getMFrameQuantum 
    ^CslNI cslNI_get_BlockResizer_mFrameQuantum: swigCPtrForBlockResizer 
  ]

  Method [ setMNumAvailableInput: mNumAvailableInput 
    CslNI cslNI_set_BlockResizer_mNumAvailableInput: swigCPtrForBlockResizer with: mNumAvailableInput
  ]

  Method [ getMNumAvailableInput 
    ^CslNI cslNI_get_BlockResizer_mNumAvailableInput: swigCPtrForBlockResizer 
  ]

  Method [ setMNumAvailableFrames: mNumAvailableFrames 
    CslNI cslNI_set_BlockResizer_mNumAvailableFrames: swigCPtrForBlockResizer with: mNumAvailableFrames
  ]

  Method [ getMNumAvailableFrames 
    ^CslNI cslNI_get_BlockResizer_mNumAvailableFrames: swigCPtrForBlockResizer 
  ]

  Method [ setMInputBuffer: mInputBuffer 
    CslNI cslNI_set_BlockResizer_mInputBuffer: swigCPtrForBlockResizer with: (Buffer getCPtr: mInputBuffer)
  ]

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

  Method [ setMOutputBuffer: mOutputBuffer 
    CslNI cslNI_set_BlockResizer_mOutputBuffer: swigCPtrForBlockResizer with: (Buffer getCPtr: mOutputBuffer)
  ]

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

  Method [ setMInputRingBuffer: mInputRingBuffer 
    CslNI cslNI_set_BlockResizer_mInputRingBuffer: swigCPtrForBlockResizer with: (RingBuffer getCPtr: mInputRingBuffer)
  ]

  Method [ getMInputRingBuffer 
    |cPtr|
    cPtr := CslNI cslNI_get_BlockResizer_mInputRingBuffer: swigCPtrForBlockResizer .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ RingBuffer fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setMOutputRingBuffer: mOutputRingBuffer 
    CslNI cslNI_set_BlockResizer_mOutputRingBuffer: swigCPtrForBlockResizer with: (RingBuffer getCPtr: mOutputRingBuffer)
  ]

  Method [ getMOutputRingBuffer 
    |cPtr|
    cPtr := CslNI cslNI_get_BlockResizer_mOutputRingBuffer: swigCPtrForBlockResizer .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ RingBuffer fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ setBlockSize: quantum 
    CslNI cslNI_BlockResizer_setBlockSize: swigCPtrForBlockResizer with: quantum
  ]

  Method [ resizeInternalBuffers 
    CslNI cslNI_BlockResizer_resizeInternalBuffers: swigCPtrForBlockResizer 
  ]

  Method [ bufferInput: inputBuffer 
    CslNI cslNI_BlockResizer_bufferInput: swigCPtrForBlockResizer with: (Buffer getCPtr: inputBuffer)
  ]

  Method [ readInput 
    CslNI cslNI_BlockResizer_readInput: swigCPtrForBlockResizer 
  ]

  Method [ bufferOutput 
    CslNI cslNI_BlockResizer_bufferOutput: swigCPtrForBlockResizer 
  ]

  Method [ readOutput: outputBuffer 
    CslNI cslNI_BlockResizer_readOutput: swigCPtrForBlockResizer with: (Buffer getCPtr: outputBuffer)
  ]

  Method [ readInputAdvancing: numFramesToAdvance 
    CslNI cslNI_BlockResizer_readInputAdvancing: swigCPtrForBlockResizer with: numFramesToAdvance
  ]

  Method [ sumIntoOutputAdvancing: numFramesToAdvance 
    CslNI cslNI_BlockResizer_sumIntoOutputAdvancing: swigCPtrForBlockResizer with: numFramesToAdvance
  ]

  Method [ readOutputAndZero: outputBuffer 
    CslNI cslNI_BlockResizer_readOutputAndZero: swigCPtrForBlockResizer with: (Buffer getCPtr: outputBuffer)
  ]

  Method [ nextBuffer: outputBuffer 
    CslNI cslNI_BlockResizer_nextBuffer: swigCPtrForBlockResizer with: (Buffer getCPtr: outputBuffer)
  ]

}
