2011-03-25 09:38:07 +00:00
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
2011-06-30 20:05:30 +00:00
|
|
|
* Version 1.3.39
|
2011-03-25 09:38:07 +00:00
|
|
|
*
|
|
|
|
* Do not make changes to this file unless you know what you are doing--modify
|
|
|
|
* the SWIG interface file instead.
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
namespace org.doubango.tinyWRAP {
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
public class AudioResampler : IDisposable {
|
|
|
|
private HandleRef swigCPtr;
|
|
|
|
protected bool swigCMemOwn;
|
|
|
|
|
|
|
|
internal AudioResampler(IntPtr cPtr, bool cMemoryOwn) {
|
|
|
|
swigCMemOwn = cMemoryOwn;
|
|
|
|
swigCPtr = new HandleRef(this, cPtr);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static HandleRef getCPtr(AudioResampler obj) {
|
|
|
|
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
|
|
|
}
|
|
|
|
|
|
|
|
~AudioResampler() {
|
|
|
|
Dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
public virtual void Dispose() {
|
|
|
|
lock(this) {
|
2011-06-30 20:05:30 +00:00
|
|
|
if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
|
|
|
|
swigCMemOwn = false;
|
|
|
|
tinyWRAPPINVOKE.delete_AudioResampler(swigCPtr);
|
2011-03-25 09:38:07 +00:00
|
|
|
}
|
2011-06-30 20:05:30 +00:00
|
|
|
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
2011-03-25 09:38:07 +00:00
|
|
|
GC.SuppressFinalize(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public AudioResampler(uint nInFreq, uint nOutFreq, uint nFrameDuration, uint nChannels, uint nQuality) : this(tinyWRAPPINVOKE.new_AudioResampler(nInFreq, nOutFreq, nFrameDuration, nChannels, nQuality), true) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool isValid() {
|
|
|
|
bool ret = tinyWRAPPINVOKE.AudioResampler_isValid(swigCPtr);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public uint getOutputRequiredSizeInShort() {
|
|
|
|
uint ret = tinyWRAPPINVOKE.AudioResampler_getOutputRequiredSizeInShort(swigCPtr);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public uint getInputRequiredSizeInShort() {
|
|
|
|
uint ret = tinyWRAPPINVOKE.AudioResampler_getInputRequiredSizeInShort(swigCPtr);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public uint process(byte[] pInData, uint nInSizeInBytes, byte[] pOutData, uint nOutSizeInBytes) {
|
|
|
|
uint ret = tinyWRAPPINVOKE.AudioResampler_process(swigCPtr, pInData, nInSizeInBytes, pOutData, nOutSizeInBytes);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|