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

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

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