Group: Windows Multimedia - Library: winmm
Quering a waveform-audio input device
Class for sound recording
MMRESULT waveInOpen(
LPHWAVEIN phwi,
UINT_PTR uDeviceID,
LPWAVEFORMATEX pwfx,
DWORD_PTR dwCallback,
DWORD_PTR dwCallbackInstance,
DWORD fdwOpen
);
DECLARE INTEGER waveInOpen IN winmm;
INTEGER @ phwi,;
INTEGER uDeviceID,;
STRING @ pwfx,;
INTEGER dwCallback,;
INTEGER dwCallbackInstance,;
LONG fdwOpen
phwi Pointer to a buffer that receives a handle identifying the open waveform-audio input device. uDeviceID Identifier of the waveform-audio input device to open.
pwfx Pointer to a WAVEFORMATEX structure that identifies the desired format for recording waveform-audio data.
dwCallback Pointer to a fixed callback function, an event handle, a handle to a window, or the identifier of a thread to be called during waveform-audio recording to process messages related to the progress of recording.
dwCallbackInstance User-instance data passed to the callback mechanism.
fdwOpen Flags for opening the device.
Returns MMSYSERR_NOERROR (0) if successful or an error otherwise.
Use the waveInGetNumDevs function to determine the number of waveform-audio input devices present on the system.
The device identifier specified by uDeviceID varies from zero to one less than the number of devices present. The WAVE_MAPPER constant can also be used as a device identifier.