mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 16:25:37 +00:00
Normalized formatting with the rest of OpenTK.
This commit is contained in:
parent
9b5d70e124
commit
baeb49e01a
|
@ -87,9 +87,9 @@ namespace OpenTK.Audio
|
|||
/// <param name="device">a pointer to a device</param>
|
||||
/// <param name="attrlist">a pointer to a set of attributes: ALC_FREQUENCY, ALC_MONO_SOURCES, ALC_REFRESH, ALC_STEREO_SOURCES, ALC_SYNC</param>
|
||||
/// <returns>Returns a pointer to the new context (NULL on failure). The attribute list can be NULL, or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values.</returns>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcCreateContext",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity]
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCreateContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity]
|
||||
[CLSCompliant(false)]
|
||||
unsafe public static extern IntPtr CreateContext( [In] IntPtr device,[In] int* attrlist );
|
||||
unsafe public static extern IntPtr CreateContext([In] IntPtr device, [In] int* attrlist);
|
||||
// ALC_API ALCcontext * ALC_APIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist );
|
||||
|
||||
/// <summary>This function creates a context using a specified device.</summary>
|
||||
|
@ -97,13 +97,13 @@ namespace OpenTK.Audio
|
|||
/// <param name="attrlist">an array of a set of attributes: ALC_FREQUENCY, ALC_MONO_SOURCES, ALC_REFRESH, ALC_STEREO_SOURCES, ALC_SYNC</param>
|
||||
/// <returns>Returns a pointer to the new context (NULL on failure).</returns>
|
||||
/// <remarks>The attribute list can be NULL, or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values.</remarks>
|
||||
public static IntPtr CreateContext( IntPtr device,int[] attriblist )
|
||||
public static IntPtr CreateContext(IntPtr device, int[] attriblist)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
fixed ( int* attriblist_ptr = attriblist )
|
||||
fixed (int* attriblist_ptr = attriblist)
|
||||
{
|
||||
return CreateContext(device,attriblist_ptr);
|
||||
return CreateContext(device, attriblist_ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,39 +113,39 @@ namespace OpenTK.Audio
|
|||
/// <summary>This function makes a specified context the current context.</summary>
|
||||
/// <param name="context">A pointer to the new context.</param>
|
||||
/// <returns>Returns True on success, or False on failure.</returns>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcMakeContextCurrent",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern bool MakeContextCurrent( [In] IntPtr context );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcMakeContextCurrent", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern bool MakeContextCurrent([In] IntPtr context);
|
||||
// ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context );
|
||||
|
||||
/// <summary>This function tells a context to begin processing. When a context is suspended, changes in OpenAL state will be accepted but will not be processed. alcSuspendContext can be used to suspend a context, and then all the OpenAL state changes can be applied at once, followed by a call to alcProcessContext to apply all the state changes immediately. In some cases, this procedure may be more efficient than application of properties in a non-suspended state. In some implementations, process and suspend calls are each a NOP.</summary>
|
||||
/// <param name="context">a pointer to the new context</param>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcProcessContext",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern void ProcessContext( [In] IntPtr context );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcProcessContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void ProcessContext([In] IntPtr context);
|
||||
// ALC_API void ALC_APIENTRY alcProcessContext( ALCcontext *context );
|
||||
|
||||
/// <summary>This function suspends processing on a specified context. When a context is suspended, changes in OpenAL state will be accepted but will not be processed. A typical use of alcSuspendContext would be to suspend a context, apply all the OpenAL state changes at once, and then call alcProcessContext to apply all the state changes at once. In some cases, this procedure may be more efficient than application of properties in a non-suspended state. In some implementations, process and suspend calls are each a NOP.</summary>
|
||||
/// <param name="context">a pointer to the context to be suspended.</param>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcSuspendContext",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern void SuspendContext( [In] IntPtr context );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcSuspendContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void SuspendContext([In] IntPtr context);
|
||||
// ALC_API void ALC_APIENTRY alcSuspendContext( ALCcontext *context );
|
||||
|
||||
/// <summary>This function destroys a context.</summary>
|
||||
/// <param name="context">a pointer to the new context.</param>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcDestroyContext",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern void DestroyContext( [In] IntPtr context );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcDestroyContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void DestroyContext([In] IntPtr context);
|
||||
// ALC_API void ALC_APIENTRY alcDestroyContext( ALCcontext *context );
|
||||
|
||||
/// <summary>This function retrieves the current context.</summary>
|
||||
/// <returns>Returns a pointer to the current context.</returns>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcGetCurrentContext",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern IntPtr GetCurrentContext( );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetCurrentContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern IntPtr GetCurrentContext();
|
||||
// ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( void );
|
||||
|
||||
/// <summary>This function retrieves a context's device pointer.</summary>
|
||||
/// <param name="context">a pointer to a context.</param>
|
||||
/// <returns>Returns a pointer to the specified context's device.</returns>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcGetContextsDevice",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern IntPtr GetContextsDevice( [In] IntPtr context );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetContextsDevice", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern IntPtr GetContextsDevice([In] IntPtr context);
|
||||
// ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
|
||||
|
||||
#endregion Context Management
|
||||
|
@ -155,15 +155,15 @@ namespace OpenTK.Audio
|
|||
/// <summary>This function opens a device by name.</summary>
|
||||
/// <param name="devicename">a null-terminated string describing a device.</param>
|
||||
/// <returns>Returns a pointer to the opened device. The return value will be NULL if there is an error.</returns>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcOpenDevice",ExactSpelling = true,CallingConvention = Alc.Style,CharSet = CharSet.Ansi),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern IntPtr OpenDevice( [In] string devicename );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcOpenDevice", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern IntPtr OpenDevice([In] string devicename);
|
||||
// ALC_API ALCdevice * ALC_APIENTRY alcOpenDevice( const ALCchar *devicename );
|
||||
|
||||
/// <summary>This function closes a device by name.</summary>
|
||||
/// <param name="device">a pointer to an opened device</param>
|
||||
/// <returns>True will be returned on success or False on failure. Closing a device will fail if the device contains any contexts or buffers.</returns>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcCloseDevice",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern bool CloseDevice( [In] IntPtr device );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCloseDevice", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern bool CloseDevice([In] IntPtr device);
|
||||
// ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device );
|
||||
|
||||
#endregion Device Management
|
||||
|
@ -173,8 +173,8 @@ namespace OpenTK.Audio
|
|||
/// <summary>This function retrieves the current context error state.</summary>
|
||||
/// <param name="device">a pointer to the device to retrieve the error state from</param>
|
||||
/// <returns>Errorcode Int32.</returns>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcGetError",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern AlcError GetError( [In] IntPtr device );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetError", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern AlcError GetError([In] IntPtr device);
|
||||
// ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device );
|
||||
|
||||
#endregion Error support.
|
||||
|
@ -185,32 +185,32 @@ namespace OpenTK.Audio
|
|||
/// <param name="device">a pointer to the device to be queried for an extension.</param>
|
||||
/// <param name="extname">a null-terminated string describing the extension.</param>
|
||||
/// <returns>Returns True if the extension is available, False if the extension is not available.</returns>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcIsExtensionPresent",ExactSpelling = true,CallingConvention = Alc.Style,CharSet = CharSet.Ansi),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern bool IsExtensionPresent( [In] IntPtr device,[In] string extname );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcIsExtensionPresent", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern bool IsExtensionPresent([In] IntPtr device, [In] string extname);
|
||||
// ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent( ALCdevice *device, const ALCchar *extname );
|
||||
|
||||
/// <summary>This function retrieves the address of a specified context extension function.</summary>
|
||||
/// <param name="device">a pointer to the device to be queried for the function.</param>
|
||||
/// <param name="funcname">a null-terminated string describing the function.</param>
|
||||
/// <returns>Returns the address of the function, or NULL if it is not found.</returns>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcGetProcAddress",ExactSpelling = true,CallingConvention = Alc.Style,CharSet = CharSet.Ansi),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern IntPtr GetProcAddress( [In] IntPtr device,[In] string funcname );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetProcAddress", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern IntPtr GetProcAddress([In] IntPtr device, [In] string funcname);
|
||||
// ALC_API void * ALC_APIENTRY alcGetProcAddress( ALCdevice *device, const ALCchar *funcname );
|
||||
|
||||
/// <summary>This function retrieves the enum value for a specified enumeration name.</summary>
|
||||
/// <param name="device">a pointer to the device to be queried.</param>
|
||||
/// <param name="enumname">a null terminated string describing the enum value.</param>
|
||||
/// <returns>Returns the enum value described by the enumName string. This is most often used for querying an enum value for an ALC extension.</returns>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcGetEnumValue",ExactSpelling = true,CallingConvention = Alc.Style,CharSet = CharSet.Ansi),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern int GetEnumValue( [In] IntPtr device,[In] string enumname );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetEnumValue", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern int GetEnumValue([In] IntPtr device, [In] string enumname);
|
||||
// ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname );
|
||||
|
||||
#endregion Extension support.
|
||||
|
||||
#region Query functions
|
||||
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcGetString",ExactSpelling = true,CallingConvention = Alc.Style,CharSet = CharSet.Ansi),SuppressUnmanagedCodeSecurity( )]
|
||||
private static extern IntPtr GetStringPrivate( [In] IntPtr device,AlcGetString param );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetString", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
private static extern IntPtr GetStringPrivate([In] IntPtr device, AlcGetString param);
|
||||
// ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param );
|
||||
|
||||
/// <summary>This function returns pointers to strings related to the context.</summary>
|
||||
|
@ -224,9 +224,9 @@ namespace OpenTK.Audio
|
|||
/// <param name="device">a pointer to the device to be queried.</param>
|
||||
/// <param name="param">an attribute to be retrieved: ALC_DEFAULT_DEVICE_SPECIFIER, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER, ALC_DEVICE_SPECIFIER, ALC_CAPTURE_DEVICE_SPECIFIER, ALC_EXTENSIONS</param>
|
||||
/// <returns>A string containing the name of the Device.</returns>
|
||||
public static string GetString( IntPtr device,AlcGetString param )
|
||||
public static string GetString(IntPtr device, AlcGetString param)
|
||||
{
|
||||
return Marshal.PtrToStringAnsi(GetStringPrivate(device,param));
|
||||
return Marshal.PtrToStringAnsi(GetStringPrivate(device, param));
|
||||
}
|
||||
|
||||
/// <summary>This function returns a List of strings related to the context.</summary>
|
||||
|
@ -268,8 +268,8 @@ namespace OpenTK.Audio
|
|||
/// <param name="param">an attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES</param>
|
||||
/// <param name="size">the size of the destination buffer provided. In bytes.</param>
|
||||
/// <param name="buffer">a pointer to the buffer to be returned</param>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcGetIntegerv",ExactSpelling = true,CallingConvention = Alc.Style,CharSet = CharSet.Ansi),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern void GetInteger( [In] IntPtr device,AlcGetInteger param,int size,[Out] out int data );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetIntegerv", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void GetInteger([In] IntPtr device, AlcGetInteger param, int size, [Out] out int data);
|
||||
// ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *buffer );
|
||||
|
||||
#endregion Query functions
|
||||
|
@ -282,36 +282,36 @@ namespace OpenTK.Audio
|
|||
/// <param name="format">the requested capture buffer format</param>
|
||||
/// <param name="buffersize">the size of the capture buffer in bytes</param>
|
||||
/// <returns>Returns the capture device pointer, or NULL on failure.</returns>
|
||||
[CLSCompliant(false),DllImport(Alc.Lib,EntryPoint = "alcCaptureOpenDevice",ExactSpelling = true,CallingConvention = Alc.Style,CharSet = CharSet.Ansi),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern IntPtr CaptureOpenDevice( string devicename,uint frequency,ALFormat format,int buffersize );
|
||||
[CLSCompliant(false), DllImport(Alc.Lib, EntryPoint = "alcCaptureOpenDevice", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern IntPtr CaptureOpenDevice(string devicename, uint frequency, ALFormat format, int buffersize);
|
||||
// ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
|
||||
|
||||
/// <summary>This function closes the specified capture device.</summary>
|
||||
/// <param name="device">a pointer to a capture device.</param>
|
||||
/// <returns>Returns True if the close operation was successful, False on failure.</returns>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcCaptureCloseDevice",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern bool CaptureCloseDevice( [In] IntPtr device );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCaptureCloseDevice", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern bool CaptureCloseDevice([In] IntPtr device);
|
||||
// ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice( ALCdevice *device );
|
||||
|
||||
/// <summary>This function begins a capture operation.</summary>
|
||||
/// <remarks>alcCaptureStart will begin recording to an internal ring buffer of the size specified when opening the capture device. The application can then retrieve the number of samples currently available using the ALC_CAPTURE_SAPMPLES token with alcGetIntegerv. When the application determines that enough samples are available for processing, then it can obtain them with a call to alcCaptureSamples.</remarks>
|
||||
/// <param name="device">a pointer to a capture device.</param>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcCaptureStart",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern void CaptureStart( [In] IntPtr device );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCaptureStart", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void CaptureStart([In] IntPtr device);
|
||||
// ALC_API void ALC_APIENTRY alcCaptureStart( ALCdevice *device );
|
||||
|
||||
/// <summary>This function stops a capture operation.</summary>
|
||||
/// <param name="device">a pointer to a capture device.</param>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcCaptureStop",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern void CaptureStop( [In] IntPtr device );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCaptureStop", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void CaptureStop([In] IntPtr device);
|
||||
// ALC_API void ALC_APIENTRY alcCaptureStop( ALCdevice *device );
|
||||
|
||||
/// <summary>This function completes a capture operation, and does not block.</summary>
|
||||
/// <param name="device">a pointer to a capture device.</param>
|
||||
/// <param name="buffer">a pointer to a buffer buffer, which must be large enough to accommodate samples number of samples.</param>
|
||||
/// <param name="samples">the number of samples to be retrieved.</param>
|
||||
[DllImport(Alc.Lib,EntryPoint = "alcCaptureSamples",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )]
|
||||
public static extern void CaptureSamples( [In] IntPtr device,[Out] out IntPtr buffer,[Out] out int samples );
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCaptureSamples", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void CaptureSamples([In] IntPtr device, [Out] out IntPtr buffer, [Out] out int samples);
|
||||
// ALC_API void ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
|
||||
|
||||
#endregion Capture functions
|
||||
|
|
Loading…
Reference in a new issue