Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
ALContext.cs
浏览该文件的文档.
1namespace Engine.Browser {
2 public class ALContext : IDisposable {
3 public static IntPtr m_device;
4 public static IntPtr m_context;
5
6 public unsafe ALContext() {
8 if (m_device == IntPtr.Zero) {
9 Log.Error("Could not create audio device");
10 return;
11 }
14 }
15
16 public void Dispose() {
17 if (m_context != IntPtr.Zero) {
18 OAL.alcMakeContextCurrent(IntPtr.Zero);
20 m_context = IntPtr.Zero;
21 }
22 if (m_device != IntPtr.Zero) {
24 m_device = IntPtr.Zero;
25 }
26 }
27 }
28}
unsafe
定义 Main.cs:15
static bool alcMakeContextCurrent(IntPtr context)
static bool alcCloseDevice(IntPtr device)
static unsafe IntPtr alcCreateContext(IntPtr device, int *attrlist)
static void alcDestroyContext(IntPtr context)
static unsafe IntPtr alcOpenDevice(byte *devicename)
static void Error(object message)
定义 Log.cs:80