示例#1
0
        internal MmResult WaveInOpen(out IntPtr waveInHandle, int deviceNumber, WaveFormatProvider waveFormat, WaveInterop.WaveCallback callback)
        {
            MmResult result;

            if (Strategy == WaveCallbackStrategy.FunctionCallback)
            {
                result = WaveInterop.waveInOpen(out waveInHandle, (IntPtr)deviceNumber, waveFormat, callback, IntPtr.Zero, WaveInOutOpenFlags.CallbackFunction);
            }
            else
            {
                result = WaveInterop.waveInOpenWindow(out waveInHandle, (IntPtr)deviceNumber, waveFormat, this.Handle, IntPtr.Zero, WaveInOutOpenFlags.CallbackWindow);
            }
            return(result);
        }