Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the WaveIn class, based on an available Device Id.
        /// </summary>
        /// <param name="deviceId">The device identifier to obtain.</param>
        /// <exception cref="ArgumentOutOfRangeException">If <paramref name="deviceId"/> is not in the valid range.</exception>
        public WaveIn(int deviceId)
        {
            if ((deviceId >= DeviceCount || deviceId < 0) && deviceId != WaveInMapperDeviceId)
            {
                throw new ArgumentOutOfRangeException("deviceId", "The Device ID specified was not within the valid range.");
            }

            this.callback = new WaveInProc(this.InternalCallback);

            this.deviceId = deviceId;
        }
Ejemplo n.º 2
0
 public static extern RESULT waveInOpen(out IntPtr hWaveIn, IntPtr uDeviceID, ref WAVEFORMATEX lpFormat, WaveInProc dwCallback, IntPtr dwInstance, OPEN_FLAGS dwFlags);