diff --git a/Source/Examples/OpenAL/TestAudioContext.cs b/Source/Examples/OpenAL/TestAudioContext.cs index 671e67ad..ffadc8c7 100644 --- a/Source/Examples/OpenAL/TestAudioContext.cs +++ b/Source/Examples/OpenAL/TestAudioContext.cs @@ -56,9 +56,9 @@ namespace Examples context.IsCurrent = false; Trace.Assert(!context.IsCurrent); - //Trace.WriteLine("IsCurrent = true..."); - //context.IsCurrent = true; - //Trace.Assert(context.IsCurrent); + Trace.WriteLine("IsCurrent = true..."); + context.IsCurrent = true; + Trace.Assert(context.IsCurrent); Trace.WriteLine("AudioContext.CurrentContext..."); Trace.Assert(AudioContext.CurrentContext == context); diff --git a/Source/OpenTK/OpenAL/AlcFunctions.cs b/Source/OpenTK/OpenAL/AlcFunctions.cs index ec17db33..358ed75a 100644 --- a/Source/OpenTK/OpenAL/AlcFunctions.cs +++ b/Source/OpenTK/OpenAL/AlcFunctions.cs @@ -114,7 +114,6 @@ namespace OpenTK.OpenAL /// A pointer to the new context. /// Returns True on success, or False on failure. [DllImport(Alc.Lib,EntryPoint = "alcMakeContextCurrent",ExactSpelling = true,CallingConvention = Alc.Style),SuppressUnmanagedCodeSecurity( )] - [return: MarshalAs(UnmanagedType.I1)] public static extern bool MakeContextCurrent( [In] IntPtr context ); // ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context ); diff --git a/Source/OpenTK/OpenAL/AudioContext.cs b/Source/OpenTK/OpenAL/AudioContext.cs index 19dc51fb..10034439 100644 --- a/Source/OpenTK/OpenAL/AudioContext.cs +++ b/Source/OpenTK/OpenAL/AudioContext.cs @@ -278,13 +278,11 @@ namespace OpenTK.Audio /// static void MakeCurrent(AudioContext context) { - lock (audio_context_lock) + //lock (audio_context_lock) { - //if (context != null && context.disposed) - // throw new ObjectDisposedException("OpenTK.Audio.AudioContext"); if (!Alc.MakeContextCurrent(context != null ? (IntPtr)context.context_handle : IntPtr.Zero)) - throw new AudioContextException( - Alc.GetError(context != null ? (IntPtr)context.context_handle : IntPtr.Zero).ToString()); + throw new AudioContextException(Alc.GetError( + context != null ? (IntPtr)context.context_handle : IntPtr.Zero).ToString()); } }