mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-07 22:50:44 +00:00
Made MakeCurrent() call public.
This commit is contained in:
parent
2fa1330f3b
commit
c5968d9cd0
|
@ -325,33 +325,14 @@ namespace OpenTK.Audio
|
||||||
lock (audio_context_lock)
|
lock (audio_context_lock)
|
||||||
{
|
{
|
||||||
if (!Alc.MakeContextCurrent(context != null ? (IntPtr)context.context_handle : IntPtr.Zero))
|
if (!Alc.MakeContextCurrent(context != null ? (IntPtr)context.context_handle : IntPtr.Zero))
|
||||||
throw new AudioContextException(Alc.GetError(
|
throw new AudioContextException(String.Format("ALC {0} error detected at {1}.",
|
||||||
context != null ? (IntPtr)context.context_handle : IntPtr.Zero).ToString());
|
Alc.GetError(context != null ? (IntPtr)context.context_handle : IntPtr.Zero).ToString(),
|
||||||
|
context != null ? context.ToString() : "null"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region internal void MakeCurrent()
|
|
||||||
|
|
||||||
/// <summary>Makes the AudioContext current in the calling thread.</summary>
|
|
||||||
/// <exception cref="ObjectDisposedException">
|
|
||||||
/// Occurs if this function is called after the AudioContext has been disposed.
|
|
||||||
/// </exception>
|
|
||||||
/// <exception cref="AudioContextException">
|
|
||||||
/// Occurs when the AudioContext could not be made current.
|
|
||||||
/// </exception>
|
|
||||||
/// <remarks>
|
|
||||||
/// Only one AudioContext can be current in the application at any time,
|
|
||||||
/// <b>regardless of the number of threads</b>.
|
|
||||||
/// </remarks>
|
|
||||||
internal void MakeCurrent()
|
|
||||||
{
|
|
||||||
AudioContext.MakeCurrent(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region internal bool IsCurrent
|
#region internal bool IsCurrent
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -392,6 +373,26 @@ namespace OpenTK.Audio
|
||||||
|
|
||||||
#region --- Public Members ---
|
#region --- Public Members ---
|
||||||
|
|
||||||
|
#region internal void MakeCurrent()
|
||||||
|
|
||||||
|
/// <summary>Makes the AudioContext current in the calling thread.</summary>
|
||||||
|
/// <exception cref="ObjectDisposedException">
|
||||||
|
/// Occurs if this function is called after the AudioContext has been disposed.
|
||||||
|
/// </exception>
|
||||||
|
/// <exception cref="AudioContextException">
|
||||||
|
/// Occurs when the AudioContext could not be made current.
|
||||||
|
/// </exception>
|
||||||
|
/// <remarks>
|
||||||
|
/// Only one AudioContext can be current in the application at any time,
|
||||||
|
/// <b>regardless of the number of threads</b>.
|
||||||
|
/// </remarks>
|
||||||
|
public void MakeCurrent()
|
||||||
|
{
|
||||||
|
AudioContext.MakeCurrent(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region public bool IsProcessing
|
#region public bool IsProcessing
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in a new issue