Exemplo n.º 1
0
        /// <summary>
        /// Finds all the connected Pedalog devices.
        /// </summary>
        /// <returns>
        /// A list of <see cref="Device[]"/> structs representing connected devices.
        /// </returns>
        public static Device[] FindAll()
        {
            int maxDevices = Pedalog.GetMaxDevices();

            Device[] devices = new Device[maxDevices];

            int deviceCount = Pedalog.FindDevices(devices);

            Device[] devicesToReturn = new Device[deviceCount];
            for (int i = 0; i < deviceCount; i++)
            {
                devicesToReturn[i] = devices[i];
            }

            return devicesToReturn;
        }
Exemplo n.º 2
0
 internal static extern int ReadData(ref Device device, ref Data data);