Пример #1
0
        internal MmResult WaveOutOpen(out IntPtr waveOutHandle, int deviceNumber, WaveFormatProvider waveFormat, WaveInterop.WaveCallback callback)
        {
            MmResult result;

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