Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
AL.cs
浏览该文件的文档.
1namespace Engine.Browser {
2 public class AL {
3 public enum GetSourceInteger {
4 ByteOffset = 0x1026,
5 SampleOffset = 0x1025,
6 Buffer = 0x1009,
7 SourceState = 0x1010,
8 BuffersQueued = 0x1015,
10 SourceType = 0x1027
11 }
12
13 public enum SourceFloat {
15 MaxDistance = 0x1023,
16 RolloffFactor = 0x1021,
17 Pitch = 0x1003,
18 Gain = 0x100A,
19 MinGain = 0x100D,
20 MaxGain = 0x100E,
23 ConeOuterGain = 0x1022,
24 SecOffset = 0x1024
25 }
26
27 public enum SourceVector3 {
28 Position = 0x1004,
29 Velocity = 0x1006,
30 Direction = 0x1005
31 }
32
33 public enum SourceInteger {
34 ByteOffset = 0x1026, // AL_EXT_OFFSET extension.
35 SampleOffset = 0x1025, // AL_EXT_OFFSET extension.
36 Buffer = 0x1009,
37 SourceType = 0x1027
38 }
39
40 public enum SourceBoolean {
42 Looping = 0x1007
43 }
44
45 public enum BufferFormat {
46 Mono8 = 0x1100,
47 Mono16 = 0x1101,
48 Stereo8 = 0x1102,
49 Stereo16 = 0x1103
50 }
51
52 public enum ListenerFloat {
53 Gain = 0x100A
54 }
55
65
66 public enum AudioError {
68 InvalidName = 0xA001,
69 IllegalEnum = 0xA002,
70 InvalidEnum = 0xA002,
71 InvalidValue = 0xA003,
74 OutOfMemory = 0xA005
75 }
76
77 public enum SourceState {
78 Initial = 0x1011,
79 Playing = 0x1012,
80 Paused = 0x1013,
81 Stopped = 0x1014
82 }
83
84 public uint GenSource() {
85 OAL.alGenSources(1, out uint source);
86 return source;
87 }
88
89 public void DeleteSource(uint source) => OAL.alDeleteSources(1, ref source);
90 public void GetSourceProperty(uint source, GetSourceInteger param, out int value) => OAL.alGetSourcei(source, (int)param, out value);
91
92 public void SetSourceProperty(uint source, SourceFloat param, float value) => OAL.alSourcef(source, (int)param, value);
93
94 public void SetSourceProperty(uint source, SourceVector3 param, float value1, float value2, float value3) =>
95 OAL.alSource3f(source, (int)param, value1, value2, value3);
96
97 public void SetSourceProperty(uint source, SourceInteger param, int value) => OAL.alSourcei(source, (int)param, value);
98
99 public void SetSourceProperty(uint source, SourceBoolean param, bool value) => OAL.alSourcei(source, (int)param, value ? 1 : 0);
100
101 public void SourcePlay(uint source) => OAL.alSourcePlay(source);
102
103 public void SourcePause(uint source) => OAL.alSourcePause(source);
104
105 public void SourceStop(uint source) => OAL.alSourceStop(source);
106
107 public void SourceRewind(uint source) => OAL.alSourceRewind(source);
108
109 public uint GenBuffer() {
110 OAL.alGenBuffers(1, out uint buffer);
111 return buffer;
112 }
113
114 public void DeleteBuffer(uint buffer) => OAL.alDeleteBuffers(1, ref buffer);
115
116 public unsafe void BufferData(uint buffer, BufferFormat format, void* data, int size, int frequency) =>
117 OAL.alBufferData(buffer, (int)format, data, size, frequency);
118
119 public unsafe void SourceUnqueueBuffers(uint source, int count, uint* buffers) => OAL.alSourceUnqueueBuffers(source, count, buffers);
120
121 public unsafe void SourceQueueBuffers(uint source, int count, uint* buffers) => OAL.alSourceQueueBuffers(source, count, buffers);
122 public void SetListenerProperty(ListenerFloat param, float value) => OAL.alListenerf((int)param, value);
123
124 public void DistanceModel(DistanceModelEnum model) => OAL.alDistanceModel((int)model);
126 }
127}
unsafe
定义 Main.cs:15
void SetSourceProperty(uint source, SourceFloat param, float value)
定义 AL.cs:92
void DistanceModel(DistanceModelEnum model)
定义 AL.cs:124
unsafe void BufferData(uint buffer, BufferFormat format, void *data, int size, int frequency)
定义 AL.cs:116
void SetSourceProperty(uint source, SourceVector3 param, float value1, float value2, float value3)
定义 AL.cs:94
void SourceStop(uint source)
定义 AL.cs:105
void SetSourceProperty(uint source, SourceInteger param, int value)
定义 AL.cs:97
void SetListenerProperty(ListenerFloat param, float value)
定义 AL.cs:122
unsafe void SourceUnqueueBuffers(uint source, int count, uint *buffers)
定义 AL.cs:119
void SetSourceProperty(uint source, SourceBoolean param, bool value)
定义 AL.cs:99
void DeleteBuffer(uint buffer)
定义 AL.cs:114
void DeleteSource(uint source)
定义 AL.cs:89
void GetSourceProperty(uint source, GetSourceInteger param, out int value)
定义 AL.cs:90
AudioError GetError()
定义 AL.cs:125
void SourcePlay(uint source)
定义 AL.cs:101
void SourceRewind(uint source)
定义 AL.cs:107
void SourcePause(uint source)
定义 AL.cs:103
unsafe void SourceQueueBuffers(uint source, int count, uint *buffers)
定义 AL.cs:121
static void alSourcei(uint source, int param, int value)
static unsafe void alSourceUnqueueBuffers(uint source, int nb, uint *buffers)
static void alSourceStop(uint source)
static void alGenSources(int n, out uint sources)
static void alDeleteBuffers(int n, ref uint buffers)
static void alDistanceModel(int model)
static void alListenerf(int param, float value)
static void alSourcePause(uint source)
static void alSourcePlay(uint source)
static void alGenBuffers(int n, out uint buffers)
static unsafe void alSourceQueueBuffers(uint source, int nb, uint *buffers)
static void alGetSourcei(uint source, int param, out int value)
static unsafe void alBufferData(uint buffer, int format, void *data, int size, int freq)
static void alSourceRewind(uint source)
static void alDeleteSources(int n, ref uint sources)
static void alSource3f(uint source, int param, float v1, float v2, float v3)
static int alGetError()
static void alSourcef(uint source, int param, float value)