From fad0929f5223a3f104e85fee02478a40f96fa8d6 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 6 Apr 2008 15:31:32 +0000 Subject: [PATCH] Renamed EfxExtension to EffectsExtension. --- Source/OpenTK/Audio/OpenAL/AL/Efx.cs | 19 ++++++++++--------- Source/OpenTK/Audio/OpenAL/AL/EfxEnums.cs | 2 -- Source/OpenTK/Audio/OpenAL/AL/EfxPresets.cs | 3 +-- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Source/OpenTK/Audio/OpenAL/AL/Efx.cs b/Source/OpenTK/Audio/OpenAL/AL/Efx.cs index a2efb9ea..5db0ed01 100644 --- a/Source/OpenTK/Audio/OpenAL/AL/Efx.cs +++ b/Source/OpenTK/Audio/OpenAL/AL/Efx.cs @@ -15,8 +15,7 @@ using OpenTK.Math; namespace OpenTK.Audio { - - public partial class EfxExtension + public partial class EffectsExtension { #region Helpers @@ -1132,13 +1131,16 @@ namespace OpenTK.Audio } } - public EfxExtension() + public EffectsExtension() { _valid = false; - if (Alc.IsExtensionPresent(Alc.GetContextsDevice(Alc.GetCurrentContext()), "ALC_EXT_EFX") == false) + if (AudioContext.CurrentContext == null) + throw new InvalidOperationException("AL.LoadAll() needs a current AudioContext."); + + if (Alc.IsExtensionPresent(AudioContext.CurrentContext.Device, "ALC_EXT_EFX") == false) { - Trace.WriteLine("Efx Extension ALC_EXT_EFX is unknown to the Device."); + Debug.WriteLine("EFX Extension (ALC_EXT_EFX) is not known to device: {0}.", AudioContext.CurrentContext.Device.ToString()); return; } // Console.WriteLine("ALC_EXT_EFX found. Efx can be used."); @@ -1157,7 +1159,7 @@ namespace OpenTK.Audio } catch (Exception e) { - Trace.WriteLine("Failed to marshal Effect functions. " + e.ToString()); + Debug.WriteLine("Failed to marshal Effect functions. " + e.ToString()); return; } // Console.WriteLine("Effect functions appear to be ok."); @@ -1174,7 +1176,7 @@ namespace OpenTK.Audio } catch (Exception e) { - Trace.WriteLine("Failed to marshal Filter functions. " + e.ToString()); + Debug.WriteLine("Failed to marshal Filter functions. " + e.ToString()); return; } // Console.WriteLine("Filter functions appear to be ok."); @@ -1191,7 +1193,7 @@ namespace OpenTK.Audio } catch (Exception e) { - Trace.WriteLine("Failed to marshal AuxiliaryEffectSlot functions. " + e.ToString()); + Debug.WriteLine("Failed to marshal AuxiliaryEffectSlot functions. " + e.ToString()); return; } // Console.WriteLine("Auxiliary Effect Slot functions appear to be ok."); @@ -1202,5 +1204,4 @@ namespace OpenTK.Audio #endregion Constructor / Extension Loading } - } diff --git a/Source/OpenTK/Audio/OpenAL/AL/EfxEnums.cs b/Source/OpenTK/Audio/OpenAL/AL/EfxEnums.cs index d8824e5a..8db871ae 100644 --- a/Source/OpenTK/Audio/OpenAL/AL/EfxEnums.cs +++ b/Source/OpenTK/Audio/OpenAL/AL/EfxEnums.cs @@ -11,7 +11,6 @@ using System; namespace OpenTK.Audio { - #region Effect ///A list of valid 32-Bits Float Effect/GetEffect parameters @@ -359,5 +358,4 @@ namespace OpenTK.Audio } #endregion Filter Object - } diff --git a/Source/OpenTK/Audio/OpenAL/AL/EfxPresets.cs b/Source/OpenTK/Audio/OpenAL/AL/EfxPresets.cs index 5626c393..f1b8f334 100644 --- a/Source/OpenTK/Audio/OpenAL/AL/EfxPresets.cs +++ b/Source/OpenTK/Audio/OpenAL/AL/EfxPresets.cs @@ -13,8 +13,7 @@ using OpenTK.Math; namespace OpenTK.Audio { - - public partial class EfxExtension + public partial class EffectsExtension { // TODO: CLS compliance. [CLSCompliant(false)]