public void Stop() { if (Source > 0) { AL.SourceStop(Source); } }
public void Play(float volume = 1.0f, bool loop = false) { if (Source > 0) { AL.Source(Source, ALSourcef.Gain, volume); AL.Source(Source, ALSourceb.Looping, loop); AL.SourcePlay(Source); } }
public void Play(Vector3 pos, float volume = 1.0f, bool loop = false) { if (Source > 0) { AL.Source(Source, ALSource3f.Position, ref pos); AL.Source(Source, ALSourcef.Gain, volume); AL.Source(Source, ALSourceb.Looping, loop); AL.SourcePlay(Source); } }
public Result Unload() { if (!Loaded) { return(Result.Success); } AL.DeleteSource(Source); AL.DeleteBuffer(ALBuffer); Loaded = false; return(Result.Success); }
public static ALDistanceModel GetDistanceModel() { return((ALDistanceModel)AL.Get(ALGetInteger.DistanceModel)); }
public static void Listener(ALListener3f param, ref Vector3 values) { AL.Listener(param, values.X, values.Y, values.Z); }
public static bool IsBuffer(int bid) { return(AL.IsBuffer((uint)bid)); }
public static unsafe void DeleteBuffers(int n, [In] ref int buffers) { fixed(int *buffers1 = &buffers) AL.DeleteBuffers(n, buffers1); }
public static int[] GenBuffers(int n) { int[] numArray = new int[n]; AL.GenBuffers(numArray.Length, out numArray[0]); return(numArray); }
public static unsafe void SourceQueueBuffer(int source, int buffer) { AL.SourceQueueBuffers((uint)source, 1, (uint *)&buffer); }
public static void GetSource(int sid, ALSource3f param, out Vector3 values) { AL.GetSource((uint)sid, param, out values.X, out values.Y, out values.Z); }
public static void GetSource(int sid, ALSource3f param, out float value1, out float value2, out float value3) { AL.GetSource((uint)sid, param, out value1, out value2, out value3); }
public static void GetSource(int sid, ALSourcef param, out float value) { AL.GetSource((uint)sid, param, out value); }
public static string Get(ALGetString param) { return(Marshal.PtrToStringAnsi(AL.GetStringPrivate(param))); }
public static void Source(int sid, ALSource3i param, int value1, int value2, int value3) { AL.Source((uint)sid, param, value1, value2, value3); }
public static void SourcePause(int sid) { AL.SourcePause((uint)sid); }
public static unsafe void SourceQueueBuffers(uint sid, int numEntries, ref uint bids) { fixed(uint *bids1 = &bids) AL.SourceQueueBuffers(sid, numEntries, bids1); }
public static void GetSource(int sid, ALGetSourcei param, out int value) { AL.GetSource((uint)sid, param, out value); }
public static unsafe void GenBuffers(int n, out int buffers) { fixed(int *buffers1 = &buffers) AL.GenBuffers(n, buffers1); }
public static string GetErrorString(ALError param) { return(Marshal.PtrToStringAnsi(AL.GetStringPrivate((ALGetString)param))); }
public static void GenBuffer(out uint buffer) { AL.GenBuffers(1, out buffer); }
public static unsafe void SourcePause(int ns, uint[] sids) { fixed(uint *sids1 = sids) AL.SourcePause(ns, sids1); }
public static void DeleteBuffer(int buffer) { AL.DeleteBuffers(1, ref buffer); }
public static unsafe void SourcePause(int ns, ref uint sids) { fixed(uint *sids1 = &sids) AL.SourcePause(ns, sids1); }
public static void BufferData(int bid, ALFormat format, IntPtr buffer, int size, int freq) { AL.BufferData((uint)bid, format, buffer, size, freq); }
public static void SourcePlay(int sid) { AL.SourcePlay((uint)sid); }
public static void GetBuffer(int bid, ALGetBufferi param, out int value) { AL.GetBuffer((uint)bid, param, out value); }
public static void SourceStop(int sid) { AL.SourceStop((uint)sid); }
public static unsafe void Listener(ALListenerfv param, ref float[] values) { fixed(float *values1 = &values[0]) AL.ListenerPrivate(param, values1); }
public static void SourceRewind(int sid) { AL.SourceRewind((uint)sid); }