From 698b76f37397628218c8098f744888c346495ecb Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sat, 2 Feb 2008 13:11:42 +0000 Subject: [PATCH] Moved some items. --- Source/OpenTK/Audio/AudioContext.cs | 110 ++++++++++++++-------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/Source/OpenTK/Audio/AudioContext.cs b/Source/OpenTK/Audio/AudioContext.cs index 357eeda1..6ebc0a67 100644 --- a/Source/OpenTK/Audio/AudioContext.cs +++ b/Source/OpenTK/Audio/AudioContext.cs @@ -310,11 +310,66 @@ namespace OpenTK.Audio #endregion + #region internal void MakeCurrent() + + /// Makes the AudioContext current in the calling thread. + /// + /// Occurs if this function is called after the AudioContext has been disposed. + /// + /// + /// Occurs when the AudioContext could not be made current. + /// + /// + /// Only one AudioContext can be current in the application at any time, + /// regardless of the number of threads. + /// + internal void MakeCurrent() + { + AudioContext.MakeCurrent(this); + } + + #endregion + + #region internal bool IsCurrent + + /// + /// Gets or sets a System.Boolean indicating whether the AudioContext + /// is current. + /// + /// + /// Only one AudioContext can be current in the application at any time, + /// regardless of the number of threads. + /// + internal bool IsCurrent + { + get + { + lock (audio_context_lock) + { + if (available_contexts.Count == 0) + return false; + else + { + return AudioContext.CurrentContext == this; + } + } + } + set + { + if (value) AudioContext.MakeCurrent(this); + else AudioContext.MakeCurrent(null); + } + } + + #endregion + #endregion // TODO: Remove before release! public IntPtr Device { get { return device_handle.Handle; } } + #region --- Public Members --- + #region public bool IsProcessing /// @@ -422,8 +477,6 @@ namespace OpenTK.Audio #endregion - #region --- Public Members --- - #region public static string[] AvailableDevices /// @@ -444,59 +497,6 @@ namespace OpenTK.Audio #endregion - #region internal void MakeCurrent() - - /// Makes the AudioContext current in the calling thread. - /// - /// Occurs if this function is called after the AudioContext has been disposed. - /// - /// - /// Occurs when the AudioContext could not be made current. - /// - /// - /// Only one AudioContext can be current in the application at any time, - /// regardless of the number of threads. - /// - internal void MakeCurrent() - { - AudioContext.MakeCurrent(this); - } - - #endregion - - #region internal bool IsCurrent - - /// - /// Gets or sets a System.Boolean indicating whether the AudioContext - /// is current. - /// - /// - /// Only one AudioContext can be current in the application at any time, - /// regardless of the number of threads. - /// - internal bool IsCurrent - { - get - { - lock (audio_context_lock) - { - if (available_contexts.Count == 0) - return false; - else - { - return AudioContext.CurrentContext == this; - } - } - } - set - { - if (value) AudioContext.MakeCurrent(this); - else AudioContext.MakeCurrent(null); - } - } - - #endregion - #region --- IDisposable Members --- ///