/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.35
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

namespace FreeSWITCH.Native {

using System;
using System.Runtime.InteropServices;

public class switch_audio_resampler_t : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal switch_audio_resampler_t(IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(switch_audio_resampler_t obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~switch_audio_resampler_t() {
    Dispose();
  }

  public virtual void Dispose() {
    lock(this) {
      if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
        swigCMemOwn = false;
        freeswitchPINVOKE.delete_switch_audio_resampler_t(swigCPtr);
      }
      swigCPtr = new HandleRef(null, IntPtr.Zero);
      GC.SuppressFinalize(this);
    }
  }

  public SWIGTYPE_p_void resampler {
    set {
      freeswitchPINVOKE.switch_audio_resampler_t_resampler_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_audio_resampler_t_resampler_get(swigCPtr);
      SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
      return ret;
    } 
  }

  public int from_rate {
    set {
      freeswitchPINVOKE.switch_audio_resampler_t_from_rate_set(swigCPtr, value);
    } 
    get {
      int ret = freeswitchPINVOKE.switch_audio_resampler_t_from_rate_get(swigCPtr);
      return ret;
    } 
  }

  public int to_rate {
    set {
      freeswitchPINVOKE.switch_audio_resampler_t_to_rate_set(swigCPtr, value);
    } 
    get {
      int ret = freeswitchPINVOKE.switch_audio_resampler_t_to_rate_get(swigCPtr);
      return ret;
    } 
  }

  public double factor {
    set {
      freeswitchPINVOKE.switch_audio_resampler_t_factor_set(swigCPtr, value);
    } 
    get {
      double ret = freeswitchPINVOKE.switch_audio_resampler_t_factor_get(swigCPtr);
      return ret;
    } 
  }

  public SWIGTYPE_p_float from {
    set {
      freeswitchPINVOKE.switch_audio_resampler_t_from_set(swigCPtr, SWIGTYPE_p_float.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_audio_resampler_t_from_get(swigCPtr);
      SWIGTYPE_p_float ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
      return ret;
    } 
  }

  public int from_len {
    set {
      freeswitchPINVOKE.switch_audio_resampler_t_from_len_set(swigCPtr, value);
    } 
    get {
      int ret = freeswitchPINVOKE.switch_audio_resampler_t_from_len_get(swigCPtr);
      return ret;
    } 
  }

  public SWIGTYPE_p_switch_size_t from_size {
    set {
      freeswitchPINVOKE.switch_audio_resampler_t_from_size_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value));
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_audio_resampler_t_from_size_get(swigCPtr), true);
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public SWIGTYPE_p_float to {
    set {
      freeswitchPINVOKE.switch_audio_resampler_t_to_set(swigCPtr, SWIGTYPE_p_float.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_audio_resampler_t_to_get(swigCPtr);
      SWIGTYPE_p_float ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
      return ret;
    } 
  }

  public uint to_len {
    set {
      freeswitchPINVOKE.switch_audio_resampler_t_to_len_set(swigCPtr, value);
    } 
    get {
      uint ret = freeswitchPINVOKE.switch_audio_resampler_t_to_len_get(swigCPtr);
      return ret;
    } 
  }

  public uint to_size {
    set {
      freeswitchPINVOKE.switch_audio_resampler_t_to_size_set(swigCPtr, value);
    } 
    get {
      uint ret = freeswitchPINVOKE.switch_audio_resampler_t_to_size_get(swigCPtr);
      return ret;
    } 
  }

  public switch_audio_resampler_t() : this(freeswitchPINVOKE.new_switch_audio_resampler_t(), true) {
  }

}

}
