From d3bccf0b4b7d2e2263892c4aac4de1162ad0789b Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Fri, 4 Sep 2009 23:12:10 +0000 Subject: [PATCH] Fixed XML documentation warnings. Removed unnecessary [CLSCompliant(true)] attributes. --- Source/OpenTK/Audio/AudioCapture.cs | 3 ++ Source/OpenTK/Audio/AudioContext.cs | 16 ++++++++++ Source/OpenTK/Audio/OpenAL/AL/AL.cs | 47 +++-------------------------- 3 files changed, 24 insertions(+), 42 deletions(-) diff --git a/Source/OpenTK/Audio/AudioCapture.cs b/Source/OpenTK/Audio/AudioCapture.cs index 010c84d6..6208943f 100644 --- a/Source/OpenTK/Audio/AudioCapture.cs +++ b/Source/OpenTK/Audio/AudioCapture.cs @@ -378,6 +378,9 @@ namespace OpenTK.Audio #region IDisposable Members + /// + /// Finalizes this instance. + /// ~AudioCapture() { Dispose(); diff --git a/Source/OpenTK/Audio/AudioContext.cs b/Source/OpenTK/Audio/AudioContext.cs index 4a6faba7..9f92160e 100644 --- a/Source/OpenTK/Audio/AudioContext.cs +++ b/Source/OpenTK/Audio/AudioContext.cs @@ -725,6 +725,9 @@ namespace OpenTK.Audio } } + /// + /// Finalizes this instance. + /// ~AudioContext() { this.Dispose(false); @@ -734,16 +737,29 @@ namespace OpenTK.Audio #region --- Overrides --- + /// + /// Calculates the hash code for this instance. + /// + /// public override int GetHashCode() { return base.GetHashCode(); } + /// + /// Compares this instance with another. + /// + /// The instance to compare to. + /// True, if obj refers to this instance; false otherwise. public override bool Equals(object obj) { return base.Equals(obj); } + /// + /// Returns a that desrcibes this instance. + /// + /// A that desrcibes this instance. public override string ToString() { return String.Format("{0} (handle: {1}, device: {2})", diff --git a/Source/OpenTK/Audio/OpenAL/AL/AL.cs b/Source/OpenTK/Audio/OpenAL/AL/AL.cs index 9a883150..4d96f390 100644 --- a/Source/OpenTK/Audio/OpenAL/AL/AL.cs +++ b/Source/OpenTK/Audio/OpenAL/AL/AL.cs @@ -402,13 +402,11 @@ namespace OpenTK.Audio.OpenAL /// This function generates one or more sources. References to sources are int values, which are used wherever a source reference is needed (in calls such as AL.DeleteSources and AL.Source with parameter ALSourcei). /// The number of sources to be generated. /// Pointer to an array of int values which will store the names of the new sources. - [CLSCompliant(true)] [DllImport(AL.Lib, EntryPoint = "alGenSources", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()] public static extern void GenSources(int n, out int sources); /// This function generates one or more sources. References to sources are int values, which are used wherever a source reference is needed (in calls such as AL.DeleteSources and AL.Source with parameter ALSourcei). /// Pointer to an array of int values which will store the names of the new sources. - [CLSCompliant(true)] public static void GenSources(int[] sources) { uint[] temp = new uint[sources.Length]; @@ -422,7 +420,6 @@ namespace OpenTK.Audio.OpenAL /// This function generates one or more sources. References to sources are int values, which are used wherever a source reference is needed (in calls such as AL.DeleteSources and AL.Source with parameter ALSourcei). /// The number of sources to be generated. /// Pointer to an array of int values which will store the names of the new sources. - [CLSCompliant(true)] public static int[] GenSources(int n) { uint[] temp = new uint[n]; @@ -437,7 +434,6 @@ namespace OpenTK.Audio.OpenAL /// This function generates one source only. References to sources are int values, which are used wherever a source reference is needed (in calls such as AL.DeleteSources and AL.Source with parameter ALSourcei). /// Pointer to an int value which will store the name of the new source. - [CLSCompliant(true)] public static int GenSource() { int temp; @@ -475,7 +471,6 @@ namespace OpenTK.Audio.OpenAL /// This function deletes one or more sources. /// The number of sources to be deleted. /// Reference to a single source, or an array of source names identifying the sources to be deleted. - [CLSCompliant(true)] [DllImport(AL.Lib, EntryPoint = "alDeleteSources", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()] public static extern void DeleteSources(int n, ref int sources); @@ -491,7 +486,6 @@ namespace OpenTK.Audio.OpenAL /// This function deletes one or more sources. /// An array of source names identifying the sources to be deleted. - [CLSCompliant(true)] public static void DeleteSources(int[] sources) { if (sources == null) throw new ArgumentNullException(); @@ -509,7 +503,6 @@ namespace OpenTK.Audio.OpenAL /// This function deletes one source only. /// Pointer to a source name identifying the source to be deleted. - [CLSCompliant(true)] public static void DeleteSource(int source) { DeleteSources(1, ref source); @@ -529,7 +522,6 @@ namespace OpenTK.Audio.OpenAL /// This function tests if a source name is valid, returning True if valid and False if not. /// A source name to be tested for validity /// Success. - [CLSCompliant(true)] public static bool IsSource(int sid) { return IsSource((uint)sid); @@ -555,7 +547,6 @@ namespace OpenTK.Audio.OpenAL /// Source name whose attribute is being set /// The name of the attribute to set: ALSourcef.Pitch, Gain, MinGain, MaxGain, MaxDistance, RolloffFactor, ConeOuterGain, ConeInnerAngle, ConeOuterAngle, ReferenceDistance, EfxAirAbsorptionFactor, EfxRoomRolloffFactor, EfxConeOuterGainHighFrequency. /// The value to set the attribute to. - [CLSCompliant(true)] public static void Source(int sid, ALSourcef param, float value) { Source((uint)sid, param, value); @@ -581,7 +572,6 @@ namespace OpenTK.Audio.OpenAL /// The three ALfloat values which the attribute will be set to. /// The three ALfloat values which the attribute will be set to. /// The three ALfloat values which the attribute will be set to. - [CLSCompliant(true)] public static void Source(int sid, ALSource3f param, float value1, float value2, float value3) { Source((uint)sid, param, value1, value2, value3); @@ -601,7 +591,6 @@ namespace OpenTK.Audio.OpenAL /// Source name whose attribute is being set. /// The name of the attribute to set: ALSource3f.Position, Velocity, Direction. /// A Math.Vector3 which the attribute will be set to. - [CLSCompliant(true)] public static void Source(int sid, ALSource3f param, ref Vector3 values) { Source((uint)sid, param, values.X, values.Y, values.Z); @@ -623,7 +612,6 @@ namespace OpenTK.Audio.OpenAL /// Source name whose attribute is being set. /// The name of the attribute to set: ALSourcei.SourceRelative, ConeInnerAngle, ConeOuterAngle, Looping, Buffer, SourceState. /// The value to set the attribute to. - [CLSCompliant(true)] public static void Source(int sid, ALSourcei param, int value) { Source((uint)sid, param, value); @@ -643,7 +631,6 @@ namespace OpenTK.Audio.OpenAL /// Source name whose attribute is being set. /// The name of the attribute to set: ALSourceb.SourceRelative, Looping. /// The value to set the attribute to. - [CLSCompliant(true)] public static void Source(int sid, ALSourceb param, bool value) { Source((uint)sid, (ALSourcei)param, (value) ? 1 : 0); @@ -661,7 +648,6 @@ namespace OpenTK.Audio.OpenAL /// (Helper) Binds a Buffer to a Source handle. /// Source name to attach the Buffer to. /// Buffer name which is attached to the Source. - [CLSCompliant(true)] public static void BindBufferToSource(int source, int buffer) { Source((uint)source, ALSourcei.Buffer, buffer); @@ -687,7 +673,6 @@ namespace OpenTK.Audio.OpenAL /// The value to set the attribute to. (EFX Extension) The destination Auxiliary Effect Slot ID /// The value to set the attribute to. (EFX Extension) The Auxiliary Send number. ///The value to set the attribute to. (EFX Extension) optional Filter ID. - [CLSCompliant(true)] public static void Source(int sid, ALSource3i param, int value1, int value2, int value3) { Source((uint)sid, param, value1, value2, value3); @@ -717,7 +702,6 @@ namespace OpenTK.Audio.OpenAL /// Source name whose attribute is being retrieved. /// The name of the attribute to set: ALSourcef.Pitch, Gain, MinGain, MaxGain, MaxDistance, RolloffFactor, ConeOuterGain, ConeInnerAngle, ConeOuterAngle, ReferenceDistance, EfxAirAbsorptionFactor, EfxRoomRolloffFactor, EfxConeOuterGainHighFrequency. /// A pointer to the floating point value being retrieved - [CLSCompliant(true)] public static void GetSource(int sid, ALSourcef param, out float value) { GetSource((uint)sid, param, out value); @@ -743,7 +727,6 @@ namespace OpenTK.Audio.OpenAL /// Pointer to the value to retrieve. /// Pointer to the value to retrieve. /// Pointer to the value to retrieve. - [CLSCompliant(true)] public static void GetSource(int sid, ALSource3f param, out float value1, out float value2, out float value3) { GetSource((uint)sid, param, out value1, out value2, out value3); @@ -763,7 +746,6 @@ namespace OpenTK.Audio.OpenAL /// Source name whose attribute is being retrieved. /// the name of the attribute being retrieved: ALSource3f.Position, Velocity, Direction. /// A Math.Vector3 to retrieve the values to. - [CLSCompliant(true)] public static void GetSource(int sid, ALSource3f param, out Vector3 values) { GetSource((uint)sid, param, out values.X, out values.Y, out values.Z); @@ -785,7 +767,6 @@ namespace OpenTK.Audio.OpenAL /// Source name whose attribute is being retrieved. /// The name of the attribute to retrieve: ALSourcei.SourceRelative, Buffer, SourceState, BuffersQueued, BuffersProcessed. /// A pointer to the integer value being retrieved. - [CLSCompliant(true)] public static void GetSource(int sid, ALGetSourcei param, out int value) { GetSource((uint)sid, param, out value); @@ -807,7 +788,6 @@ namespace OpenTK.Audio.OpenAL /// Source name whose attribute is being retrieved. /// The name of the attribute to get: ALSourceb.SourceRelative, Looping. /// A pointer to the bool value being retrieved. - [CLSCompliant(true)] public static void GetSource(int sid, ALSourceb param, out bool value) { int result; @@ -853,7 +833,6 @@ namespace OpenTK.Audio.OpenAL /// This function plays a set of sources. The playing sources will have their state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state. /// The number of sources to be played. /// A pointer to an array of sources to be played. - [CLSCompliant(true)] public static void SourcePlay(int ns, int[] sids) { uint[] temp = new uint[ns]; @@ -908,7 +887,6 @@ namespace OpenTK.Audio.OpenAL /// This function stops a set of sources. The stopped sources will have their state changed to ALSourceState.Stopped. /// The number of sources to stop. /// A pointer to an array of sources to be stopped. - [CLSCompliant(true)] public static void SourceStop(int ns, int[] sids) { uint[] temp = new uint[ns]; @@ -963,7 +941,6 @@ namespace OpenTK.Audio.OpenAL /// This function stops a set of sources and sets all their states to ALSourceState.Initial. /// The number of sources to be rewound. /// A pointer to an array of sources to be rewound. - [CLSCompliant(true)] public static void SourceRewind(int ns, int[] sids) { uint[] temp = new uint[ns]; @@ -1017,7 +994,6 @@ namespace OpenTK.Audio.OpenAL /// This function pauses a set of sources. The paused sources will have their state changed to ALSourceState.Paused. /// The number of sources to be paused. /// A pointer to an array of sources to be paused. - [CLSCompliant(true)] public static void SourcePause(int ns, int[] sids) { uint[] temp = new uint[ns]; @@ -1059,7 +1035,6 @@ namespace OpenTK.Audio.OpenAL /// This function plays, replays or resumes a source. The playing source will have it's state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state. /// The name of the source to be played. - [CLSCompliant(true)] public static void SourcePlay(int sid) { SourcePlay((uint)sid); @@ -1077,7 +1052,6 @@ namespace OpenTK.Audio.OpenAL /// This function stops a source. The stopped source will have it's state changed to ALSourceState.Stopped. /// The name of the source to be stopped. - [CLSCompliant(true)] public static void SourceStop(int sid) { SourceStop((uint)sid); @@ -1095,7 +1069,6 @@ namespace OpenTK.Audio.OpenAL /// This function stops the source and sets its state to ALSourceState.Initial. /// The name of the source to be rewound. - [CLSCompliant(true)] public static void SourceRewind(int sid) { SourceRewind((uint)sid); @@ -1113,7 +1086,6 @@ namespace OpenTK.Audio.OpenAL /// This function pauses a source. The paused source will have its state changed to ALSourceState.Paused. /// The name of the source to be paused. - [CLSCompliant(true)] public static void SourcePause(int sid) { SourcePause((uint)sid); @@ -1155,7 +1127,6 @@ namespace OpenTK.Audio.OpenAL /// The name of the source to queue buffers onto. /// The number of buffers to be queued. /// A pointer to an array of buffer names to be queued. - [CLSCompliant(true)] public static void SourceQueueBuffers(int sid, int numEntries, int[] bids) { uint[] temp = new uint[numEntries]; @@ -1292,14 +1263,12 @@ namespace OpenTK.Audio.OpenAL /// This function generates one or more buffers, which contain audio buffer (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers). /// The number of buffers to be generated. /// Pointer to an array of uint values which will store the names of the new buffers. - [CLSCompliant(true)] [DllImport(AL.Lib, EntryPoint = "alGenBuffers", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity] public static extern void GenBuffers(int n, out int buffers); /// This function generates one or more buffers, which contain audio data (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers). /// The number of buffers to be generated. /// Pointer to an array of uint values which will store the names of the new buffers. - [CLSCompliant(true)] public static int[] GenBuffers(int n) { int[] buffers = new int[n]; @@ -1309,7 +1278,6 @@ namespace OpenTK.Audio.OpenAL /// This function generates one buffer only, which contain audio data (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers). /// Pointer to an uint value which will store the name of the new buffer. - [CLSCompliant(true)] public static int GenBuffer() { int temp; @@ -1347,7 +1315,6 @@ namespace OpenTK.Audio.OpenAL /// This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source. /// The number of buffers to be deleted. /// Pointer to an array of buffer names identifying the buffers to be deleted. - [CLSCompliant(true)] [DllImport(AL.Lib, EntryPoint = "alDeleteBuffers", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()] public static extern void DeleteBuffers(int n, [In] ref int buffers); @@ -1363,7 +1330,6 @@ namespace OpenTK.Audio.OpenAL /// This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source. /// Pointer to an array of buffer names identifying the buffers to be deleted. - [CLSCompliant(true)] public static void DeleteBuffers(int[] buffers) { if (buffers == null) throw new ArgumentNullException(); @@ -1381,8 +1347,7 @@ namespace OpenTK.Audio.OpenAL /// This function deletes one buffer only, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source. /// Pointer to a buffer name identifying the buffer to be deleted. - [CLSCompliant(true)] - public static void DeleteBuffer(int buffer) + public static void DeleteBuffer(int buffer) { DeleteBuffers(1, ref buffer); } @@ -1401,7 +1366,6 @@ namespace OpenTK.Audio.OpenAL /// This function tests if a buffer name is valid, returning True if valid, False if not. /// A buffer Handle previously allocated with . /// Success. - [CLSCompliant(true)] public static bool IsBuffer(int bid) { uint temp = (uint)bid; @@ -1428,7 +1392,6 @@ namespace OpenTK.Audio.OpenAL /// Pointer to a pinned audio buffer. /// The size of the audio buffer in bytes. /// The frequency of the audio buffer. - [CLSCompliant(true)] public static void BufferData(int bid, ALFormat format, IntPtr buffer, int size, int freq) { BufferData((uint)bid, format, buffer, size, freq); @@ -1497,7 +1460,6 @@ namespace OpenTK.Audio.OpenAL /// Buffer name whose attribute is being retrieved /// The name of the attribute to be retrieved: ALGetBufferi.Frequency, Bits, Channels, Size, and the currently hidden AL_DATA (dangerous). /// A pointer to an int to hold the retrieved buffer - [CLSCompliant(true)] public static void GetBuffer(int bid, ALGetBufferi param, out int value) { GetBuffer((uint)bid, param, out value); @@ -1586,7 +1548,6 @@ namespace OpenTK.Audio.OpenAL /// (Helper) Returns Source state information. /// The source to be queried. /// state information from OpenAL. - [CLSCompliant(true)] public static ALSourceState GetSourceState(int sid) { int temp; @@ -1608,7 +1569,6 @@ namespace OpenTK.Audio.OpenAL /// (Helper) Returns Source type information. /// The source to be queried. /// type information from OpenAL. - [CLSCompliant(true)] public static ALSourceType GetSourceType(int sid) { int temp; @@ -1616,7 +1576,10 @@ namespace OpenTK.Audio.OpenAL return (ALSourceType)temp; } - [CLSCompliant(true)] + /// + /// Returns the of the current context. + /// + /// The of the current context. public static ALDistanceModel GetDistanceModel() { return (ALDistanceModel)AL.Get(ALGetInteger.DistanceModel);