Ejemplo n.º 1
0
 public AudioSource()
 {
     Al.alGenSources(1, out ID);
     OpenAlException.CheckAl();
     this.context = AudioContext.CurrentContext;
     this.context.Disposing += OnContextDisposing;
 }
Ejemplo n.º 2
0
 internal AudioSource(int iD, AudioContext context)
 {
     this.ID = iD;
     this.context = context;
     this.context.Disposing += OnContextDisposing;
 }
Ejemplo n.º 3
0
 public ContextChangedEventArgs(AudioContext oldContext, AudioContext newContext)
 {
     this.oldContext = oldContext;
     this.newContext = newContext;
 }
Ejemplo 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));
     }
 }