public AudioContext(AudioDevice device, AudioContextParameters contextParameters) : base(false) { this.device = device; int[] realParameters = null; if (contextParameters != null) { realParameters = contextParameters.GetValue(); } Handle = Alc.alcCreateContext(device.Handle, realParameters); if (Handle == IntPtr.Zero) { throw new OpenAlException("The Context failed to be Created"); } device.Disposing += OnDeviceDisposing; }
private AudioContext(AudioDevice device, IntPtr handle) : base(true) { this.Handle = handle; this.device = device; }
public AudioContext(AudioDevice device) : this(device, null) { }
internal static void SetAlutContext() { IntPtr context = Alc.alcGetCurrentContext(); AudioDevice device = new AudioDevice(Alc.alcGetContextsDevice(context)); currentContext = new AudioContext(device, context); if (ContextChanged != null) { ContextChanged(null, new ContextChangedEventArgs(null, currentContext)); } }