Example #1
0
        public static void CaptureSamples <T>(IntPtr device, ref T buffer, int samples) where T : struct
        {
            GCHandle gcHandle = GCHandle.Alloc((object)buffer, GCHandleType.Pinned);

            try
            {
                Alc.CaptureSamples(device, gcHandle.AddrOfPinnedObject(), samples);
            }
            finally
            {
                gcHandle.Free();
            }
        }
Example #2
0
 public static void CaptureSamples <T>(IntPtr device, T[,,] buffer, int samples) where T : struct
 {
     Alc.CaptureSamples <T>(device, buffer.Address(0, 0, 0), samples);
 }
Example #3
0
 public static void CaptureSamples <T>(IntPtr device, T[] buffer, int samples) where T : struct
 {
     Alc.CaptureSamples <T>(device, ref buffer[0], samples);
 }