Client LuaCsForBarotrauma
Al.cs
1 /***
2 
3 MIT License
4 
5 Copyright (c) 2018 Nathan Glover
6 
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13 
14 The above copyright notice and this permission notice shall be included in all
15 copies or substantial portions of the Software.
16 
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 SOFTWARE.
24 
25 ****************
26 
27 Further modified for use in Barotrauma.
28 Original source code at https://github.com/NathanielGlover/OpenAL.NETCore/
29 
30 ***/
31 
32 using System;
33 using System.Runtime.InteropServices;
34 
35 namespace OpenAL
36 {
37  public class Al
38  {
39 #if OSX
40  public const string OpenAlDll = "/System/Library/Frameworks/OpenAL.framework/OpenAL";
41 #elif LINUX
42  public const string OpenAlDll = "libopenal.so.1";
43 #elif WINDOWS
44 #if X86
45  public const string OpenAlDll = "soft_oal_x86.dll";
46 #elif X64
47  public const string OpenAlDll = "soft_oal_x64.dll";
48 #endif
49 #endif
50 
51  #region Enum
52 
53  public const int None = 0;
54  public const int False = 0;
55  public const int True = 1;
56  public const int SourceRelative = 0x202;
57  public const int ConeInnerAngle = 0x1001;
58  public const int ConeOuterAngle = 0x1002;
59  public const int Pitch = 0x1003;
60  public const int Position = 0x1004;
61  public const int Direction = 0x1005;
62  public const int Velocity = 0x1006;
63  public const int Looping = 0x1007;
64  public const int Buffer = 0x1009;
65  public const int Gain = 0x100A;
66  public const int MinGain = 0x100D;
67  public const int MaxGain = 0x100E;
68  public const int Orientation = 0x100F;
69  public const int SourceState = 0x1010;
70  public const int Initial = 0x1011;
71  public const int Playing = 0x1012;
72  public const int Paused = 0x1013;
73  public const int Stopped = 0x1014;
74  public const int BuffersQueued = 0x1015;
75  public const int BuffersProcessed = 0x1016;
76  public const int SecOffset = 0x1024;
77  public const int SampleOffset = 0x1025;
78  public const int ByteOffset = 0x1026;
79  public const int SourceType = 0x1027;
80  public const int Static = 0x1028;
81  public const int Streaming = 0x1029;
82  public const int Undetermined = 0x1030;
83  public const int FormatMono8 = 0x1100;
84  public const int FormatMono16 = 0x1101;
85  public const int FormatStereo8 = 0x1102;
86  public const int FormatStereo16 = 0x1103;
87  public const int ReferenceDistance = 0x1020;
88  public const int RolloffFactor = 0x1021;
89  public const int ConeOuterGain = 0x1022;
90  public const int MaxDistance = 0x1023;
91  public const int Frequency = 0x2001;
92  public const int Bits = 0x2002;
93  public const int Channels = 0x2003;
94  public const int Size = 0x2004;
95  public const int Unused = 0x2010;
96  public const int Pending = 0x2011;
97  public const int Processed = 0x2012;
98  public const int NoError = False;
99  public const int InvalidName = 0xA001;
100  public const int InvalidEnum = 0xA002;
101  public const int InvalidValue = 0xA003;
102  public const int InvalidOperation = 0xA004;
103  public const int OutOfMemory = 0xA005;
104  public const int Vendor = 0xB001;
105  public const int Version = 0xB002;
106  public const int Renderer = 0xB003;
107  public const int Extensions = 0xB004;
108  public const int EnumDopplerFactor = 0xC000;
109  public const int EnumDopplerVelocity = 0xC001;
110  public const int EnumSpeedOfSound = 0xC003;
111  public const int EnumDistanceModel = 0xD000;
112  public const int InverseDistance = 0xD001;
113  public const int InverseDistanceClamped = 0xD002;
114  public const int LinearDistance = 0xD003;
115  public const int LinearDistanceClamped = 0xD004;
116  public const int ExponentDistance = 0xD005;
117  public const int ExponentDistanceClamped = 0xD006;
118 
119  #endregion
120 
121  #region Functions
122 
123  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alEnable")]
124  public static extern void Enable(int capability);
125 
126  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alDisable")]
127  public static extern void Disable(int capability);
128 
129  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alIsEnabled")]
130  public static extern bool IsEnabled(int capability);
131 
132  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetString")]
133  private static extern IntPtr _GetString(int param);
134 
135  public static string GetString(int param) => Marshal.PtrToStringAnsi(_GetString(param));
136 
137  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetBooleanv")]
138  public static extern void GetBooleanv(int param, out bool data);
139 
140  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetIntegerv")]
141  public static extern void GetIntegerv(int param, out int data);
142 
143  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetFloatv")]
144  public static extern void GetFloatv(int param, out float data);
145 
146  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetDoublev")]
147  public static extern void GetDoublev(int param, out double data);
148 
149  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetBoolean")]
150  public static extern bool GetBoolean(int param);
151 
152  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetInteger")]
153  public static extern int GetInteger(int param);
154 
155  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetFloat")]
156  public static extern float GetFloat(int param);
157 
158  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetDouble")]
159  public static extern double GetDouble(int param);
160 
161  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetError")]
162  public static extern int GetError();
163 
164  public static string GetErrorString(int error)
165  {
166  switch (error)
167  {
168  case NoError:
169  return "No error";
170  case InvalidName:
171  return "Invalid name";
172  case InvalidEnum:
173  return "Invalid enum";
174  case InvalidValue:
175  return "Invalid value";
176  case InvalidOperation:
177  return "Invalid operation";
178  case OutOfMemory:
179  return "Out of memory";
180  default:
181  return "Unknown error";
182  }
183  }
184 
185  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alIsExtensionPresent")]
186  public static extern bool IsExtensionPresent(string extname);
187 
188  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetProcAddress")]
189  public static extern IntPtr GetProcAddress(string fname);
190 
191  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetEnumValue")]
192  public static extern int GetEnumValue(string ename);
193 
194  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alListenerf")]
195  public static extern void Listenerf(int param, float value);
196 
197  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alListener3f")]
198  public static extern void Listener3f(int param, float value1, float value2, float value3);
199 
200  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alListenerfv")]
201  public static extern void Listenerfv(int param, float[] values);
202 
203  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetListenerf")]
204  public static extern void GetListenerf(int param, out float value);
205 
206  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetListener3f")]
207  public static extern void GetListener3f(int param, out float value1, out float value2, out float value3);
208 
209  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetListenerfv")]
210  private static extern void _GetListenerfv(int param, IntPtr values);
211 
212  public static void GetListenerfv(int param, out float[] values)
213  {
214  int len;
215  switch(param)
216  {
217  case Gain:
218  len = 1;
219  break;
220  case Position:
221  case Velocity:
222  len = 3;
223  break;
224  case Orientation:
225  len = 6;
226  break;
227  default:
228  len = 0;
229  break;
230  }
231 
232  values = new float[len];
233 
234  GCHandle arrayHandle = GCHandle.Alloc(values, GCHandleType.Pinned);
235  _GetListenerfv(param, arrayHandle.AddrOfPinnedObject());
236  arrayHandle.Free();
237  }
238 
239  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGenSources")]
240  private static extern void _GenSources(int n, IntPtr sources);
241 
242  public static void GenSources(int n, out uint[] sources)
243  {
244  sources = new uint[n];
245 
246  GCHandle arrayHandle = GCHandle.Alloc(sources, GCHandleType.Pinned);
247  _GenSources(n, arrayHandle.AddrOfPinnedObject());
248  arrayHandle.Free();
249  }
250 
251  public static void GenSource(out uint source)
252  {
253  GenSources(1, out var sources);
254  source = sources[0];
255  }
256 
257  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alDeleteSources")]
258  public static extern void DeleteSources(int n, uint[] sources);
259 
260  public static void DeleteSource(uint source) => DeleteSources(1, new[] {source});
261 
262  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alIsSource")]
263  public static extern bool IsSource(uint sid);
264 
265  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourcef")]
266  public static extern void Sourcef(uint sid, int param, float value);
267 
268  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSource3f")]
269  public static extern void Source3f(uint sid, int param, float value1, float value2, float value3);
270 
271  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourcefv")]
272  public static extern void Sourcefv(uint sid, int param, float[] values);
273 
274  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourcei")]
275  public static extern void Sourcei(uint sid, int param, int value);
276 
277  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSource3i")]
278  public static extern void Source3i(uint sid, int param, int value1, int value2, int value3);
279 
280  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourceiv")]
281  public static extern void Sourceiv(uint sid, int param, int[] values);
282 
283  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetSourcef")]
284  public static extern void GetSourcef(uint sid, int param, out float value);
285 
286  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetSource3f")]
287  public static extern void GetSource3f(uint sid, int param, out float value1, out float value2, out float value3);
288 
289  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetSourcefv")]
290  private static extern void _GetSourcefv(uint sid, int param, IntPtr values);
291 
292  public static void GetSourcefv(uint sid, int param, out float[] values)
293  {
294  int len;
295  switch(param)
296  {
297  case Pitch:
298  case Gain:
299  case MaxDistance:
300  case RolloffFactor:
301  case ReferenceDistance:
302  case MinGain:
303  case MaxGain:
304  case ConeOuterGain:
305  case ConeInnerAngle:
306  case ConeOuterAngle:
307  case SecOffset:
308  case SampleOffset:
309  case ByteOffset:
310  len = 1;
311  break;
312  case Position:
313  case Velocity:
314  case Direction:
315  len = 3;
316  break;
317  default:
318  len = 0;
319  break;
320  }
321 
322  values = new float[len];
323 
324  GCHandle arrayHandle = GCHandle.Alloc(values, GCHandleType.Pinned);
325  _GetSourcefv(sid, param, arrayHandle.AddrOfPinnedObject());
326  arrayHandle.Free();
327  }
328 
329  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetSourcei")]
330  public static extern void GetSourcei(uint sid, int param, out int value);
331 
332  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetSource3i")]
333  public static extern void GetSource3i(uint sid, int param, out int value1, out int value2, out int value3);
334 
335  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetSourceiv")]
336  private static extern void _GetSourceiv(uint sid, int param, IntPtr values);
337 
338  public static void GetSourceiv(uint sid, int param, out int[] values)
339  {
340  int len;
341  switch(param)
342  {
343  case MaxDistance:
344  case RolloffFactor:
345  case ReferenceDistance:
346  case ConeInnerAngle:
347  case ConeOuterAngle:
348  case SourceRelative:
349  case SourceType:
350  case Looping:
351  case Buffer:
352  case SourceState:
353  case BuffersQueued:
354  case BuffersProcessed:
355  case SecOffset:
356  case SampleOffset:
357  case ByteOffset:
358  len = 1;
359  break;
360  case Direction:
361  len = 3;
362  break;
363  default:
364  len = 0;
365  break;
366  }
367 
368  values = new int[len];
369 
370  GCHandle arrayHandle = GCHandle.Alloc(values, GCHandleType.Pinned);
371  _GetSourceiv(sid, param, arrayHandle.AddrOfPinnedObject());
372  arrayHandle.Free();
373  }
374 
375  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourcePlayv")]
376  public static extern void SourcePlayv(int ns, uint[] sids);
377 
378  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourceStopv")]
379  public static extern void SourceStopv(int ns, uint[] sids);
380 
381  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourceRewindv")]
382  public static extern void SourceRewindv(int ns, uint[] sids);
383 
384  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourcePausev")]
385  public static extern void SourcePausev(int ns, uint[] sids);
386 
387  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourcePlay")]
388  public static extern void SourcePlay(uint sid);
389 
390  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourceStop")]
391  public static extern void SourceStop(uint sid);
392 
393  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourceRewind")]
394  public static extern void SourceRewind(uint sid);
395 
396  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourcePause")]
397  public static extern void SourcePause(uint sid);
398 
399  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourceQueueBuffers")]
400  public static extern void SourceQueueBuffers(uint sid, int numEntries, uint[] bids);
401 
402  public static void SourceQueueBuffer(uint sid, uint bid)
403  {
404  uint[] bids = new uint[1]; bids[0] = bid;
405  SourceQueueBuffers(sid, 1, bids);
406  }
407 
408  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSourceUnqueueBuffers")]
409  public static extern void SourceUnqueueBuffers(uint sid, int numEntries, uint[] bids);
410 
411  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGenBuffers")]
412  private static extern void _GenBuffers(int n, IntPtr buffers);
413 
414  public static void GenBuffers(int n, out uint[] buffers)
415  {
416  buffers = new uint[n];
417 
418  GCHandle arrayHandle = GCHandle.Alloc(buffers, GCHandleType.Pinned);
419  _GenBuffers(n, arrayHandle.AddrOfPinnedObject());
420  arrayHandle.Free();
421  }
422 
423  public static void GenBuffer(out uint buffer)
424  {
425  GenBuffers(1, out var buffers);
426  buffer = buffers[0];
427  }
428 
429  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alDeleteBuffers")]
430  public static extern void DeleteBuffers(int n, uint[] buffers);
431 
432  public static void DeleteBuffer(uint buffer) => DeleteBuffers(1, new[] {buffer});
433 
434  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alIsBuffer")]
435  public static extern bool IsBuffer(uint bid);
436 
437  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alBufferData")]
438  public static extern void BufferData(uint bid, int format, IntPtr data, int size, int freq);
439 
440  public static void BufferData<T>(uint bid, int format, T[] data, int len, int freq)
441  {
442  GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned);
443  BufferData(bid, format, handle.AddrOfPinnedObject(), len, freq);
444  handle.Free();
445  }
446 
447  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alBufferi")]
448  public static extern void Bufferi(uint bid, int param, int value);
449 
450  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alGetBufferi")]
451  public static extern void GetBufferi(uint bid, int param, out int value);
452 
453  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alDopplerFactor")]
454  public static extern void DopplerFactor(float value);
455 
456  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alDopplerVelocity")]
457  public static extern void DopplerVelocity(float value);
458 
459  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alSpeedOfSound")]
460  public static extern void SpeedOfSound(float value);
461 
462  [DllImport(OpenAlDll, CallingConvention = CallingConvention.Cdecl, EntryPoint = "alDistanceModel")]
463  public static extern void DistanceModel(int distanceModel);
464 
465  #endregion
466  }
467 }
Definition: Al.cs:38
static void SourcePlayv(int ns, uint[] sids)
static void GetSource3f(uint sid, int param, out float value1, out float value2, out float value3)
static void GetListenerf(int param, out float value)
static void Sourcefv(uint sid, int param, float[] values)
const int None
Definition: Al.cs:53
const int LinearDistanceClamped
Definition: Al.cs:115
static void DeleteBuffer(uint buffer)
const int Renderer
Definition: Al.cs:106
static void GetIntegerv(int param, out int data)
const int ConeInnerAngle
Definition: Al.cs:57
const int InvalidValue
Definition: Al.cs:101
static void SourceStopv(int ns, uint[] sids)
static void GetSourcei(uint sid, int param, out int value)
static bool GetBoolean(int param)
const int LinearDistance
Definition: Al.cs:114
static int GetInteger(int param)
const int EnumDopplerFactor
Definition: Al.cs:108
const int SourceRelative
Definition: Al.cs:56
const int SourceState
Definition: Al.cs:69
static void Listener3f(int param, float value1, float value2, float value3)
static void Listenerfv(int param, float[] values)
static void GetFloatv(int param, out float data)
static void GetListenerfv(int param, out float[] values)
Definition: Al.cs:212
static bool IsSource(uint sid)
static void Enable(int capability)
static bool IsBuffer(uint bid)
const int InvalidName
Definition: Al.cs:99
const int Undetermined
Definition: Al.cs:82
static void SourceQueueBuffer(uint sid, uint bid)
Definition: Al.cs:402
const int Pending
Definition: Al.cs:96
static void Sourcef(uint sid, int param, float value)
static void GenSources(int n, out uint[] sources)
Definition: Al.cs:242
const int Orientation
Definition: Al.cs:68
const int OutOfMemory
Definition: Al.cs:103
const int Version
Definition: Al.cs:105
const int ExponentDistance
Definition: Al.cs:116
static void SourcePausev(int ns, uint[] sids)
static void DeleteSource(uint source)
static void GetSource3i(uint sid, int param, out int value1, out int value2, out int value3)
static void GetSourcefv(uint sid, int param, out float[] values)
Definition: Al.cs:292
static void DeleteBuffers(int n, uint[] buffers)
static void GenBuffer(out uint buffer)
Definition: Al.cs:423
const int False
Definition: Al.cs:54
const int FormatMono8
Definition: Al.cs:83
static void Bufferi(uint bid, int param, int value)
static void Listenerf(int param, float value)
static void SourcePlay(uint sid)
static IntPtr GetProcAddress(string fname)
const int Vendor
Definition: Al.cs:104
static void SourceQueueBuffers(uint sid, int numEntries, uint[] bids)
const int ReferenceDistance
Definition: Al.cs:87
const int FormatStereo16
Definition: Al.cs:86
const int MaxGain
Definition: Al.cs:67
const int BuffersProcessed
Definition: Al.cs:75
const int MaxDistance
Definition: Al.cs:90
static void Source3i(uint sid, int param, int value1, int value2, int value3)
static void GetBufferi(uint bid, int param, out int value)
const int InvalidEnum
Definition: Al.cs:100
const int Channels
Definition: Al.cs:93
static void SourceStop(uint sid)
static void BufferData< T >(uint bid, int format, T[] data, int len, int freq)
Definition: Al.cs:440
const int SecOffset
Definition: Al.cs:76
const int InvalidOperation
Definition: Al.cs:102
static void GetListener3f(int param, out float value1, out float value2, out float value3)
const int FormatStereo8
Definition: Al.cs:85
static double GetDouble(int param)
const int InverseDistanceClamped
Definition: Al.cs:113
static string GetErrorString(int error)
Definition: Al.cs:164
static void DeleteSources(int n, uint[] sources)
const int Frequency
Definition: Al.cs:91
static int GetError()
const int RolloffFactor
Definition: Al.cs:88
const int SourceType
Definition: Al.cs:79
const int Extensions
Definition: Al.cs:107
const int FormatMono16
Definition: Al.cs:84
static void SourceRewind(uint sid)
const int True
Definition: Al.cs:55
static void Disable(int capability)
const int ConeOuterGain
Definition: Al.cs:89
static void GenSource(out uint source)
Definition: Al.cs:251
const int Pitch
Definition: Al.cs:59
static void Sourcei(uint sid, int param, int value)
static void DistanceModel(int distanceModel)
const int Gain
Definition: Al.cs:65
static void BufferData(uint bid, int format, IntPtr data, int size, int freq)
const int Velocity
Definition: Al.cs:62
const int Processed
Definition: Al.cs:97
static void Source3f(uint sid, int param, float value1, float value2, float value3)
const int MinGain
Definition: Al.cs:66
const int Unused
Definition: Al.cs:95
static void GetDoublev(int param, out double data)
const int Static
Definition: Al.cs:80
static bool IsExtensionPresent(string extname)
const int ByteOffset
Definition: Al.cs:78
const int BuffersQueued
Definition: Al.cs:74
const int EnumSpeedOfSound
Definition: Al.cs:110
static void SourcePause(uint sid)
static void DopplerFactor(float value)
const int ExponentDistanceClamped
Definition: Al.cs:117
const int Position
Definition: Al.cs:60
const int Bits
Definition: Al.cs:92
static int GetEnumValue(string ename)
const int SampleOffset
Definition: Al.cs:77
static void SourceRewindv(int ns, uint[] sids)
static bool IsEnabled(int capability)
static void GetBooleanv(int param, out bool data)
const int Initial
Definition: Al.cs:70
static string GetString(int param)
const int Playing
Definition: Al.cs:71
static void SpeedOfSound(float value)
const int Looping
Definition: Al.cs:63
const int Buffer
Definition: Al.cs:64
const int Stopped
Definition: Al.cs:73
static void GetSourceiv(uint sid, int param, out int[] values)
Definition: Al.cs:338
const int ConeOuterAngle
Definition: Al.cs:58
const int EnumDistanceModel
Definition: Al.cs:111
const int Streaming
Definition: Al.cs:81
static void DopplerVelocity(float value)
const int Direction
Definition: Al.cs:61
const int Paused
Definition: Al.cs:72
const int NoError
Definition: Al.cs:98
static void SourceUnqueueBuffers(uint sid, int numEntries, uint[] bids)
static float GetFloat(int param)
static void GenBuffers(int n, out uint[] buffers)
Definition: Al.cs:414
const int Size
Definition: Al.cs:94
static void Sourceiv(uint sid, int param, int[] values)
const int InverseDistance
Definition: Al.cs:112
static void GetSourcef(uint sid, int param, out float value)
const int EnumDopplerVelocity
Definition: Al.cs:109
Definition: Al.cs:36