Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 private AudioContext(AudioDevice device, IntPtr handle)
     : base(true)
 {
     this.Handle = handle;
     this.device = device;
 }
Exemplo n.º 3
0
 public AudioContext(AudioDevice device)
     : this(device, null)
 {
 }
Exemplo n.º 4
0
 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));
     }
 }