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

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

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