예제 #1
0
파일: WaveIn.cs 프로젝트: otac0n/winmm
        /// <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;
        }
예제 #2
0
 public static extern RESULT waveInOpen(out IntPtr hWaveIn, IntPtr uDeviceID, ref WAVEFORMATEX lpFormat, WaveInProc dwCallback, IntPtr dwInstance, OPEN_FLAGS dwFlags);