/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ namespace cAudio { using System; using System.Runtime.InteropServices; public class IMemoryProvider : IDisposable { private HandleRef swigCPtr; protected bool swigCMemOwn; internal IMemoryProvider(IntPtr cPtr, bool cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = new HandleRef(this, cPtr); } internal static HandleRef getCPtr(IMemoryProvider obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; } ~IMemoryProvider() { Dispose(); } public virtual void Dispose() { lock(this) { if (swigCPtr.Handle != IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; cAudioCSharpWrapperPINVOKE.delete_IMemoryProvider(swigCPtr); } swigCPtr = new HandleRef(null, IntPtr.Zero); } GC.SuppressFinalize(this); } } public virtual SWIGTYPE_p_void Allocate(uint size, string filename, int line, string function) { IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IMemoryProvider_Allocate(swigCPtr, size, filename, line, function); SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false); return ret; } public virtual void Free(SWIGTYPE_p_void pointer) { cAudioCSharpWrapperPINVOKE.IMemoryProvider_Free(swigCPtr, SWIGTYPE_p_void.getCPtr(pointer)); } public virtual uint getMaxAllocationSize() { uint ret = cAudioCSharpWrapperPINVOKE.IMemoryProvider_getMaxAllocationSize(swigCPtr); return ret; } } }