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