Still trying to debug crash on Mono. Reverted changes.
This commit is contained in:
parent
9c0087e1bf
commit
f3916e3357
3 changed files with 6 additions and 9 deletions
|
@ -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);
|
||||
|
|
|
@ -114,7 +114,6 @@ namespace OpenTK.OpenAL
|
|||
/// <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( )]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool MakeContextCurrent( [In] IntPtr context );
|
||||
// ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context );
|
||||
|
||||
|
|
|
@ -278,13 +278,11 @@ namespace OpenTK.Audio
|
|||
/// </exception>
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue