Example #1
0
 public void Stop()
 {
     if (Source > 0)
     {
         AL.SourceStop(Source);
     }
 }
Example #2
0
 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);
     }
 }
Example #3
0
 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);
     }
 }
Example #4
0
        public Result Unload()
        {
            if (!Loaded)
            {
                return(Result.Success);
            }

            AL.DeleteSource(Source);
            AL.DeleteBuffer(ALBuffer);

            Loaded = false;
            return(Result.Success);
        }
Example #5
0
 public static ALDistanceModel GetDistanceModel()
 {
     return((ALDistanceModel)AL.Get(ALGetInteger.DistanceModel));
 }
Example #6
0
 public static void Listener(ALListener3f param, ref Vector3 values)
 {
     AL.Listener(param, values.X, values.Y, values.Z);
 }
Example #7
0
 public static bool IsBuffer(int bid)
 {
     return(AL.IsBuffer((uint)bid));
 }
Example #8
0
 public static unsafe void DeleteBuffers(int n, [In] ref int buffers)
 {
     fixed(int *buffers1 = &buffers)
     AL.DeleteBuffers(n, buffers1);
 }
Example #9
0
 public static int[] GenBuffers(int n)
 {
     int[] numArray = new int[n];
     AL.GenBuffers(numArray.Length, out numArray[0]);
     return(numArray);
 }
Example #10
0
 public static unsafe void SourceQueueBuffer(int source, int buffer)
 {
     AL.SourceQueueBuffers((uint)source, 1, (uint *)&buffer);
 }
Example #11
0
 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);
 }
Example #12
0
 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);
 }
Example #13
0
 public static void GetSource(int sid, ALSourcef param, out float value)
 {
     AL.GetSource((uint)sid, param, out value);
 }
Example #14
0
 public static string Get(ALGetString param)
 {
     return(Marshal.PtrToStringAnsi(AL.GetStringPrivate(param)));
 }
Example #15
0
 public static void Source(int sid, ALSource3i param, int value1, int value2, int value3)
 {
     AL.Source((uint)sid, param, value1, value2, value3);
 }
Example #16
0
 public static void SourcePause(int sid)
 {
     AL.SourcePause((uint)sid);
 }
Example #17
0
 public static unsafe void SourceQueueBuffers(uint sid, int numEntries, ref uint bids)
 {
     fixed(uint *bids1 = &bids)
     AL.SourceQueueBuffers(sid, numEntries, bids1);
 }
Example #18
0
 public static void GetSource(int sid, ALGetSourcei param, out int value)
 {
     AL.GetSource((uint)sid, param, out value);
 }
Example #19
0
 public static unsafe void GenBuffers(int n, out int buffers)
 {
     fixed(int *buffers1 = &buffers)
     AL.GenBuffers(n, buffers1);
 }
Example #20
0
 public static string GetErrorString(ALError param)
 {
     return(Marshal.PtrToStringAnsi(AL.GetStringPrivate((ALGetString)param)));
 }
Example #21
0
 public static void GenBuffer(out uint buffer)
 {
     AL.GenBuffers(1, out buffer);
 }
Example #22
0
 public static unsafe void SourcePause(int ns, uint[] sids)
 {
     fixed(uint *sids1 = sids)
     AL.SourcePause(ns, sids1);
 }
Example #23
0
 public static void DeleteBuffer(int buffer)
 {
     AL.DeleteBuffers(1, ref buffer);
 }
Example #24
0
 public static unsafe void SourcePause(int ns, ref uint sids)
 {
     fixed(uint *sids1 = &sids)
     AL.SourcePause(ns, sids1);
 }
Example #25
0
 public static void BufferData(int bid, ALFormat format, IntPtr buffer, int size, int freq)
 {
     AL.BufferData((uint)bid, format, buffer, size, freq);
 }
Example #26
0
 public static void SourcePlay(int sid)
 {
     AL.SourcePlay((uint)sid);
 }
Example #27
0
 public static void GetBuffer(int bid, ALGetBufferi param, out int value)
 {
     AL.GetBuffer((uint)bid, param, out value);
 }
Example #28
0
 public static void SourceStop(int sid)
 {
     AL.SourceStop((uint)sid);
 }
Example #29
0
 public static unsafe void Listener(ALListenerfv param, ref float[] values)
 {
     fixed(float *values1 = &values[0])
     AL.ListenerPrivate(param, values1);
 }
Example #30
0
 public static void SourceRewind(int sid)
 {
     AL.SourceRewind((uint)sid);
 }