#region License /* MIT License Copyright ©2003-2006 Tao Framework Team http://www.taoframework.com All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #endregion License // Disable missing XML comment warnings #pragma warning disable 1591 using System; using System.Runtime.InteropServices; using System.Security; using System.Collections.Generic; using System.Text; namespace Tao.OpenAl { #region Class Documentation /// /// OpenAL binding for .NET, implementing ALC 1.1. /// /// /// Binds functions and definitions in OpenAL32.dll or libAL.so. /// #endregion Class Documentation [Obsolete("Use OpenTK.Audio.OpenAL instead.")] public static class Alc { // --- Fields --- #region Private Constants #region string ALC_NATIVE_LIBRARY /// /// Specifies OpenAl's native library archive. /// /// /// Specifies OpenAl32.dll everywhere; will be mapped via .config for mono. /// private const string ALC_NATIVE_LIBRARY = "OpenAL32.dll"; #endregion string ALC_NATIVE_LIBRARY #region CallingConvention CALLING_CONVENTION /// /// Specifies the calling convention. /// /// /// Specifies . /// private const CallingConvention CALLING_CONVENTION = CallingConvention.Cdecl; #endregion CallingConvention CALLING_CONVENTION #endregion Private Constants #region Public OpenAL 1.1 Constants #region ALC_INVALID /// /// Bad value. /// // #define ALC_INVALID (0) public const int ALC_INVALID = (0); #endregion ALC_INVALID #region ALC_FALSE /// /// bool false. /// // #define ALC_FALSE 0 public const int ALC_FALSE = 0; #endregion ALC_FALSE #region ALC_TRUE /// /// bool true. /// // #define ALC_TRUE 1 public const int ALC_TRUE = 1; #endregion ALC_TRUE #region ALC_NO_ERROR /// /// No error. /// // #define ALC_NO_ERROR ALC_FALSE public const int ALC_NO_ERROR = ALC_FALSE; #endregion ALC_NO_ERROR #region ALC_MAJOR_VERSION /// /// Major version. /// // #define ALC_MAJOR_VERSION 0x1000 public const int ALC_MAJOR_VERSION = 0x1000; #endregion ALC_MAJOR_VERSION #region ALC_MINOR_VERSION /// /// Minor version. /// // #define ALC_MINOR_VERSION 0x1001 public const int ALC_MINOR_VERSION = 0x1001; #endregion ALC_MINOR_VERSION #region ALC_ATTRIBUTES_SIZE /// /// Attributes size. /// // #define ALC_ATTRIBUTES_SIZE 0x1002 public const int ALC_ATTRIBUTES_SIZE = 0x1002; #endregion ALC_ATTRIBUTES_SIZE #region ALC_ALL_ATTRIBUTES /// /// All attributes. /// // #define ALC_ALL_ATTRIBUTES 0x1003 public const int ALC_ALL_ATTRIBUTES = 0x1003; #endregion ALC_ALL_ATTRIBUTES #region ALC_CAPTURE_DEVICE_SPECIFIER /// /// Capture device specifier. /// // #define ALC_CAPTURE_DEVICE_SPECIFIER 0x310 public const int ALC_CAPTURE_DEVICE_SPECIFIER = 0x310; #endregion ALC_CAPTURE_DEVICE_SPECIFIER #region ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER /// /// Capture default device specifier. /// // #define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311 public const int ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER = 0x311; #endregion ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER #region ALC_CAPTURE_SAMPLES /// /// Capture samples. /// // #define ALC_CAPTURE_SAMPLES 0x312 public const int ALC_CAPTURE_SAMPLES = 0x312; #endregion ALC_CAPTURE_SAMPLES #region ALC_DEFAULT_DEVICE_SPECIFIER /// /// Default device specifier. /// // #define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004 public const int ALC_DEFAULT_DEVICE_SPECIFIER = 0x1004; #endregion ALC_DEFAULT_DEVICE_SPECIFIER #region ALC_DEVICE_SPECIFIER /// /// Device specifier. /// // #define ALC_DEVICE_SPECIFIER 0x1005 public const int ALC_DEVICE_SPECIFIER = 0x1005; #endregion ALC_DEVICE_SPECIFIER #region ALC_EXTENSIONS /// /// Extensions. /// // #define ALC_EXTENSIONS 0x1006 public const int ALC_EXTENSIONS = 0x1006; #endregion ALC_EXTENSIONS #region ALC_FREQUENCY /// /// Frequency. /// // #define ALC_FREQUENCY 0x1007 public const int ALC_FREQUENCY = 0x1007; #endregion ALC_FREQUENCY #region ALC_REFRESH /// /// Refresh. /// // #define ALC_REFRESH 0x1008 public const int ALC_REFRESH = 0x1008; #endregion ALC_REFRESH #region ALC_SYNC /// /// Sync. /// // #define ALC_SYNC 0x1009 public const int ALC_SYNC = 0x1009; #endregion ALC_SYNC #region ALC_MONO_SOURCES /// /// Num of requested Mono (3D) Sources /// // #define ALC_MONO_SOURCES 0x1010 public const int ALC_MONO_SOURCES = 0x1010; #endregion ALC_MONO_SOURCES #region ALC_STEREO_SOURCES /// /// Num of requested Stereo Sources /// // #define ALC_STEREO_SOURCES 0x1011 public const int ALC_STEREO_SOURCES = 0x1011; #endregion ALC_STEREO_SOURCES #region ALC_INVALID_DEVICE /// /// The device argument does not name a valid device. /// // #define ALC_INVALID_DEVICE 0xA001 public const int ALC_INVALID_DEVICE = 0xA001; #endregion ALC_INVALID_DEVICE #region ALC_INVALID_CONTEXT /// /// The context argument does not name a valid context. /// // #define ALC_INVALID_CONTEXT 0xA002 public const int ALC_INVALID_CONTEXT = 0xA002; #endregion ALC_INVALID_CONTEXT #region ALC_INVALID_ENUM /// /// A function was called at inappropriate time, or in an inappropriate way, causing /// an illegal state. This can be an incompatible value, object ID, and/or function. /// // #define ALC_INVALID_ENUM 0xA003 public const int ALC_INVALID_ENUM = 0xA003; #endregion ALC_INVALID_ENUM #region ALC_INVALID_VALUE /// /// Illegal value passed as an argument to an AL call. Applies to parameter values, /// but not to enumerations. /// // #define ALC_INVALID_VALUE 0xA004 public const int ALC_INVALID_VALUE = 0xA004; #endregion ALC_INVALID_VALUE #region ALC_OUT_OF_MEMORY /// /// A function could not be completed, because there is not enough memory available. /// // #define ALC_OUT_OF_MEMORY 0xA005 public const int ALC_OUT_OF_MEMORY = 0xA005; #endregion ALC_OUT_OF_MEMORY #region ALC_ENUMERATE_ALL_EXT public const int ALC_DEFAULT_ALL_DEVICES_SPECIFIER = 0x1012; public const int ALC_ALL_DEVICES_SPECIFIER = 0x1013; #endregion #region ALC_EFX_EXT public const string ALC_EXT_EFX_NAME = "ALC_EXT_EFX"; public const int ALC_EFX_MAJOR_VERSION = 0x20001; public const int ALC_EFX_MINOR_VERSION = 0x20002; public const int ALC_MAX_AUXILIARY_SENDS = 0x20003; #endregion #endregion Public OpenAL 1.0 Constants // --- Public Externs --- #region Public OpenAL 1.1 Methods #region alcCloseDevice([In] IntPtr device) /// /// Closes a device. /// /// /// A pointer to an opened device. /// // ALCAPI ALCvoid ALCAPIENTRY alcCloseDevice(ALCdevice *device); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern void alcCloseDevice([In] IntPtr device); #endregion alcCloseDevice([In] IntPtr device) #region IntPtr alcCreateContext([In] IntPtr device, [In] ref int attribute) /// /// Creates a context using a specified device. /// /// /// A pointer to a device. /// /// /// /// A pointer to a set of attributes: /// /// /// /// /// /// /// /// /// /// /// Returns a pointer to the new context (IntPtr.Zero on failure). /// // ALCAPI ALCcontext* ALCAPIENTRY alcCreateContext(ALCdevice *device, ALCint *attrList); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern IntPtr alcCreateContext([In] IntPtr device, [In] ref int attribute); #endregion IntPtr alcCreateContext([In] IntPtr device, [In] ref int attribute) #region IntPtr alcCreateContext([In] IntPtr device, [In] int[] attribute) /// /// Creates a context using a specified device. /// /// /// A pointer to a device. /// /// /// /// A pointer to a set of attributes: /// /// /// /// /// /// /// /// /// /// /// Returns a pointer to the new context (IntPtr.Zero on failure). /// // ALCAPI ALCcontext* ALCAPIENTRY alcCreateContext(ALCdevice *device, ALCint *attrList); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern IntPtr alcCreateContext([In] IntPtr device, [In] int[] attribute); #endregion IntPtr alcCreateContext([In] IntPtr device, [In] int[] attribute) #region IntPtr alcCreateContext([In] IntPtr device, [In] IntPtr attribute) /// /// Creates a context using a specified device. /// /// /// A pointer to a device. /// /// /// /// A pointer to a set of attributes: /// /// /// /// /// /// /// /// /// /// /// Returns a pointer to the new context (IntPtr.Zero on failure). /// // ALCAPI ALCcontext* ALCAPIENTRY alcCreateContext(ALCdevice *device, ALCint *attrList); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern IntPtr alcCreateContext([In] IntPtr device, [In] IntPtr attribute); #endregion IntPtr alcCreateContext([In] IntPtr device, [In] IntPtr attribute) #region IntPtr alcCreateContext([In] IntPtr device, [In] int *attribute) /// /// Creates a context using a specified device. /// /// /// A pointer to a device. /// /// /// /// A pointer to a set of attributes: /// /// /// /// /// /// /// /// /// /// /// Returns a pointer to the new context (IntPtr.Zero on failure). /// // ALCAPI ALCcontext* ALCAPIENTRY alcCreateContext(ALCdevice *device, ALCint *attrList); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), CLSCompliant(false), SuppressUnmanagedCodeSecurity] public unsafe static extern IntPtr alcCreateContext([In] IntPtr device, [In] int* attribute); #endregion IntPtr alcCreateContext([In] IntPtr device, [In] int *attribute) #region alcDestroyContext([In] IntPtr context) /// /// Destroys a context. /// /// /// Pointer to the context to be destroyed. /// // ALCAPI ALCvoid ALCAPIENTRY alcDestroyContext(ALCcontext *context); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern void alcDestroyContext([In] IntPtr context); #endregion alcDestroyContext([In] IntPtr context) #region IntPtr alcGetContextsDevice([In] IntPtr context) /// /// Gets the device for a context. /// /// /// The context to query. /// /// /// A pointer to a device or IntPtr.Zero on failue. /// // ALCAPI ALCdevice* ALCAPIENTRY alcGetContextsDevice(ALCcontext *context); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern IntPtr alcGetContextsDevice([In] IntPtr context); #endregion IntPtr alcGetContextsDevice([In] IntPtr context) #region IntPtr alcGetCurrentContext() /// /// Retrieves the current context. /// /// /// Returns a pointer to the current context or IntPtr.Zero on failure. /// // ALCAPI ALCcontext* ALCAPIENTRY alcGetCurrentContext(ALCvoid); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern IntPtr alcGetCurrentContext(); #endregion IntPtr alcGetCurrentContext() #region int alcGetEnumValue([In] IntPtr device, string enumName) /// /// Retrieves the enum value for a specified enumeration name. /// /// /// The device to be queried. /// /// /// A null terminated string describing the enum value. /// /// /// Returns the enum value described by the enumName string. /// // ALCAPI ALCenum ALCAPIENTRY alcGetEnumValue(ALCdevice *device, ALCubyte *enumName); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity] public static extern int alcGetEnumValue([In] IntPtr device, string enumName); #endregion int alcGetEnumValue([In] IntPtr device, string enumName) #region int alcGetError([In] IntPtr device) /// /// Retrieves the current context error state. /// /// /// The device to query. /// /// /// The current context error state will be returned. /// // ALCAPI ALCenum ALCAPIENTRY alcGetError(ALCdevice *device); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern int alcGetError([In] IntPtr device); #endregion int alcGetError([In] IntPtr device) #region alcGetIntegerv([In] IntPtr device, int attribute, int size, out int data) /// /// Returns integers related to the context. /// /// /// The device to be queried. /// /// /// /// An attribute to be retrieved: /// /// /// /// /// /// /// /// /// /// /// /// The size of the destination buffer provided. /// /// /// A pointer to the data to be returned. /// // ALCAPI ALCvoid ALCAPIENTRY alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern void alcGetIntegerv([In] IntPtr device, int attribute, int size, out int data); #endregion alcGetIntegerv([In] IntPtr device, int attribute, int size, out int data) #region alcGetIntegerv([In] IntPtr device, int attribute, int size, [Out] int[] data) /// /// Returns integers related to the context. /// /// /// The device to be queried. /// /// /// /// An attribute to be retrieved: /// /// /// /// /// /// /// /// /// /// /// /// The size of the destination buffer provided. /// /// /// A pointer to the data to be returned. /// // ALCAPI ALCvoid ALCAPIENTRY alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern void alcGetIntegerv([In] IntPtr device, int attribute, int size, [Out] int[] data); #endregion alcGetIntegerv([In] IntPtr device, int attribute, int size, [Out] int[] data) #region alcGetIntegerv([In] IntPtr device, int attribute, int size, [Out] IntPtr data) /// /// Returns integers related to the context. /// /// /// The device to be queried. /// /// /// /// An attribute to be retrieved: /// /// /// /// /// /// /// /// /// /// /// /// The size of the destination buffer provided. /// /// /// A pointer to the data to be returned. /// // ALCAPI ALCvoid ALCAPIENTRY alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern void alcGetIntegerv([In] IntPtr device, int attribute, int size, [Out] IntPtr data); #endregion alcGetIntegerv([In] IntPtr device, int attribute, int size, [Out] IntPtr data) #region alcGetIntegerv([In] IntPtr device, int attribute, int size, [Out] int *data) /// /// Returns integers related to the context. /// /// /// The device to be queried. /// /// /// /// An attribute to be retrieved: /// /// /// /// /// /// /// /// /// /// /// /// The size of the destination buffer provided. /// /// /// A pointer to the data to be returned. /// // ALCAPI ALCvoid ALCAPIENTRY alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), CLSCompliant(false), SuppressUnmanagedCodeSecurity] public unsafe static extern void alcGetIntegerv([In] IntPtr device, int attribute, int size, [Out] int* data); #endregion alcGetIntegerv([In] IntPtr device, int attribute, int size, [Out] int *data) #region IntPtr alcGetProcAddress([In] IntPtr device, string functionName) /// /// Retrieves the address of a specified context extension function. /// /// /// The device to be queried for the function. /// /// /// A null terminated string describing the function. /// /// /// Returns the address of the function, or IntPtr.Zero if it is not found. /// // ALCAPI ALCvoid* ALCAPIENTRY alcGetProcAddress(ALCdevice *device, ALCubyte *funcName); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity] public static extern IntPtr alcGetProcAddress([In] IntPtr device, string functionName); #endregion IntPtr alcGetProcAddress([In] IntPtr device, string functionName) #region string alcGetString([In] IntPtr device, int attribute) /// /// Returns strings related to the context. /// /// /// The device to be queried. /// /// /// /// An attribute to be retrieved: /// /// /// /// /// /// /// /// /// /// /// Returns a pointer to a string. /// // ALCAPI ALCubyte* ALCAPIENTRY alcGetString(ALCdevice *device, ALCenum param); //[DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION, CharSet = CharSet.Ansi, EntryPoint = "alcGetString"), SuppressUnmanagedCodeSecurity] //public static extern string alcGetString([In] IntPtr device, int attribute); public static string alcGetString([In] IntPtr device, int attribute) { return Marshal.PtrToStringAnsi(alcGetStringInternal(device, attribute)); } [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION, CharSet = CharSet.Ansi, EntryPoint = "alcGetString"), SuppressUnmanagedCodeSecurity] private static extern IntPtr alcGetStringInternal([In] IntPtr device, int attribute); /// /// Returns strings related to the context. /// /// /// The device to be queried. /// /// /// /// An attribute to be retrieved: /// /// /// /// /// /// /// /// /// /// /// Returns a pointer to a string. /// public static string[] alcGetStringv([In] IntPtr device, int attribute) { return GetStringArray(alcGetStringInternal(device, attribute)); } private static string[] GetStringArray(IntPtr ptr) { if (ptr == IntPtr.Zero) { return null; } List rv = new List(); StringBuilder builder = new StringBuilder(); for (int index = 0; ; index++) { char ch = (char)Marshal.ReadByte(ptr, index); if (ch == '\0') { if (builder.Length == 0) { break; } else { rv.Add(builder.ToString()); builder.Length = 0; } } else { builder.Append(ch); } } return rv.ToArray(); } #endregion string alcGetString([In] IntPtr device, int attribute) #region int alcIsExtensionPresent([In] IntPtr device, string extensionName) /// /// Queries if a specified context extension is available. /// /// /// The device to be queried for an extension. /// /// /// A null terminated string describing the extension. /// /// /// Returns if the extension is available, /// if the extension is not available. /// // ALCAPI ALCboolean ALCAPIENTRY alcIsExtensionPresent(ALCdevice *device, ALCubyte *extName); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity] public static extern int alcIsExtensionPresent([In] IntPtr device, string extensionName); #endregion int alcIsExtensionPresent([In] IntPtr device, string extensionName) #region int alcMakeContextCurrent([In] IntPtr context) /// /// Makes a specified context the current context. /// /// /// Pointer to the new context. /// /// /// Returns an error code on failure. /// // ALCAPI ALCboolean ALCAPIENTRY alcMakeContextCurrent(ALCcontext *context); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern int alcMakeContextCurrent([In] IntPtr context); #endregion int alcMakeContextCurrent([In] IntPtr context) #region IntPtr alcOpenDevice(string deviceName) /// /// Opens a device by name. /// /// /// A null-terminated string describing a device. /// /// /// Returns a pointer to the opened device. /// // ALCAPI ALCdevice* ALCAPIENTRY alcOpenDevice(ALCubyte *deviceName); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity] public static extern IntPtr alcOpenDevice(string deviceName); #endregion IntPtr alcOpenDevice(string deviceName) #region alcProcessContext([In] IntPtr context) /// /// Tells a context to begin processing. /// /// /// Pointer to the new context. /// // ALCAPI ALCvoid ALCAPIENTRY alcProcessContext(ALCcontext *context); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern void alcProcessContext([In] IntPtr context); #endregion alcProcessContext([In] IntPtr context) #region alcSuspendContext([In] IntPtr context) /// /// Suspends processing on a specified context. /// /// /// A pointer to the context to be suspended. /// // ALCAPI ALCvoid ALCAPIENTRY alcSuspendContext(ALCcontext *context); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern void alcSuspendContext([In] IntPtr context); #endregion alcSuspendContext([In] IntPtr context) #region IntPtr alcCaptureOpenDevice(string devicename, int frequency, int format, int buffersize) /// /// /// /// /// The Open Device will be captured /// // ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize ); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern IntPtr alcCaptureOpenDevice(string devicename, int frequency, int format, int buffersize); #endregion IntPtr alcCaptureOpenDevice(string devicename, int frequency, int format, int buffersize) #region int alcCaptureCloseDevice([In] IntPtr device) /// /// /// /// /// /// // ALC_API ALCboolean ALC_APIENTRY alcCaptureStart( ALCdevice *device ); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern int alcCaptureCloseDevice([In] IntPtr device); #endregion int alcCaptureCloseDevice([In] IntPtr device) #region void alcCaptureStart([In] IntPtr device) /// /// /// /// /// /// // ALC_API ALCboolean ALC_APIENTRY alcCaptureStart( ALCdevice *device ); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern void alcCaptureStart([In] IntPtr device); #endregion void alcCaptureStart([In] IntPtr device) #region void alcCaptureStop([In] IntPtr device) /// /// /// /// /// /// // ALC_API ALCboolean ALC_APIENTRY alcCaptureStop( ALCdevice *device ); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern void alcCaptureStop([In] IntPtr device); #endregion void alcCaptureStop([In] IntPtr device) #region void alcCaptureSamples([In] IntPtr device, [In] IntPtr buffer, int samples) /// /// /// /// /// /// // ALC_API ALCboolean ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples ); [DllImport(ALC_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public static extern void alcCaptureSamples([In] IntPtr device, [In] IntPtr buffer, int samples); #endregion void alcCaptureSamples([In] IntPtr device, [In] IntPtr buffer, int samples) #endregion Public OpenAL 1.1 Methods #region Public OpenAL 1.1 Delegates #region IntPtr LPALCCREATECONTEXTDelegate([In] IntPtr device, [In] ref int attrlist) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate IntPtr LPALCCREATECONTEXTDelegate([In] IntPtr device, [In] ref int attrlist); #endregion IntPtr LPALCCREATECONTEXTDelegate([In] IntPtr device, [In] ref int attrlist) #region int LPALCMAKECONTEXTCURRENTDelegate([In] IntPtr context) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int LPALCMAKECONTEXTCURRENTDelegate([In] IntPtr context); #endregion int LPALCMAKECONTEXTCURRENTDelegate([In] IntPtr context) #region void LPALCPROCESSCONTEXTDelegate([In] IntPtr context) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void LPALCPROCESSCONTEXTDelegate([In] IntPtr context); #endregion void LPALCPROCESSCONTEXTDelegate([In] IntPtr context) #region void LPALCSUSPENDCONTEXTDelegate([In] IntPtr context) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void LPALCSUSPENDCONTEXTDelegate([In] IntPtr context); #endregion void LPALCSUSPENDCONTEXTDelegate([In] IntPtr context) #region void LPALCDESTROYCONTEXTDelegate([In] IntPtr context) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void LPALCDESTROYCONTEXTDelegate([In] IntPtr context); #endregion void LPALCDESTROYCONTEXTDelegate([In] IntPtr context) #region IntPtr LPALCGETCURRENTECONTEXTDelegate() /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate IntPtr LPALCGETCURRENTECONTEXTDelegate(); #endregion IntPtr LPALCGETCURRENTECONTEXTDelegate() #region IntPtr LPALCCONTEXTSDEVICEDelegate([In] IntPtr context) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate IntPtr LPALCGETCONTEXTSDEVICEDelegate([In] IntPtr context); #endregion IntPtr LPALCGETCONTEXTSDEVICEDelegate([In] IntPtr context) #region IntPtr LPALCOPENDEVICEDelegate(string devicename) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate IntPtr LPALCOPENDEVICEDelegate(string devicename); #endregion IntPtr LPALCOPENDEVICEDelegate(string devicename) #region int LPALCCLOSEDEVICEDelegate([In] IntPtr device) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int LPALCCLOSEDEVICEDelegate([In] IntPtr device); #endregion int LPALCCLOSEDEVICEDelegate([In] IntPtr device) #region int LPALCCLOSEDEVICEDelegate([In] IntPtr device) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int LPALCGETERRORDelegate([In] IntPtr device); #endregion int LPALCCLOSEDEVICEDelegate([In] IntPtr device) #region int LPALCISEXTENSIONPRESENTDelegate([In] IntPtr device, string extname) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int LPALCISEXTENSIONPRESENTDelegate([In] IntPtr device, string extname); #endregion int LPALCISEXTENSIONPRESENTDelegate([In] IntPtr device, string extname) #region IntPtr LPALCGETPROCADDRESSDelegate([In] IntPtr device, string funcname) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate IntPtr LPALCGETPROCADDRESSDelegate([In] IntPtr device, string funcname); #endregion IntPtr LPALCGETPROCADDRESSDelegate([In] IntPtr device, string funcname) #region int LPALCGETENUMVALUEDelegate([In] IntPtr device, string enumname) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int LPALCGETENUMVALUEDelegate([In] IntPtr device, string enumname); #endregion int LPALCGETENUMVALUEDelegate([In] IntPtr device, string enumname) #region string LPALCGETSTRINGDelegate([In] IntPtr device, string enumname) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate string LPALCGETSTRINGDelegate([In] IntPtr device, string enumname); #endregion string LPALCGETSTRINGDelegate([In] IntPtr device, string enumname) #region void LPALCGETINTEGERVDelegate([In] IntPtr context, int param, int size, out int data) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void LPALCGETINTEGERVDelegate([In] IntPtr context, int param, int size, out int data); #endregion void LPALCGETINTEGERVDelegate([In] IntPtr context, int param, int size, out int data) #region void LPALCCAPTUREOPENDEVICEDelegate(string devicename, int frequency, int format, int buffersize) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void LPALCCAPTUREOPENDEVICEDelegate(string devicename, int frequency, int format, int buffersize); #endregion void LPALCCAPTUREOPENDEVICEDelegate(string devicename, int frequency, int format, int buffersize) #region int LPALCCAPTURECLOSEDEVICEDelegate([In] IntPtr device) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int LPALCCAPTURECLOSEDEVICEDelegate([In] IntPtr device); #endregion int LPALCCAPTURECLOSEDEVICEDelegate([In] IntPtr device) #region void LPALCCAPTURESTARTDelegate([In] IntPtr device) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void LPALCCAPTURESTARTDelegate([In] IntPtr device); #endregion void LPALCCAPTURESTARTDelegate([In] IntPtr device) #region void LPALCCAPTURESTOPDelegate([In] IntPtr device) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void LPALCCAPTURESTOPDelegate([In] IntPtr device); #endregion void LPALCCAPTURESTOPDelegate([In] IntPtr device) #region void LPALCCAPTURESAMPLESDelegate([In] IntPtr device, [In] IntPtr buffer, int samples) /// /// /// [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void LPALCCAPTURESAMPLESDelegate([In] IntPtr device, [In] IntPtr buffer, int samples); #endregion void LPALCCAPTURESAMPLESDelegate([In] IntPtr device, [In] IntPtr buffer, int samples) #endregion Public OpenAL 1.1 Delegates } }