コード例 #1
0
ファイル: AudioSource.cs プロジェクト: nanase/ALSharp
 public AudioSource()
 {
     Al.alGenSources(1, out ID);
     OpenAlException.CheckAl();
     this.context = AudioContext.CurrentContext;
     this.context.Disposing += OnContextDisposing;
 }
コード例 #2
0
ファイル: AudioSource.cs プロジェクト: nanase/ALSharp
 internal AudioSource(int iD, AudioContext context)
 {
     this.ID = iD;
     this.context = context;
     this.context.Disposing += OnContextDisposing;
 }
コード例 #3
0
ファイル: AudioContext.cs プロジェクト: nanase/ALSharp
 public ContextChangedEventArgs(AudioContext oldContext, AudioContext newContext)
 {
     this.oldContext = oldContext;
     this.newContext = newContext;
 }
コード例 #4
0
ファイル: AudioContext.cs プロジェクト: nanase/ALSharp
 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));
     }
 }