IDirectSoundCaptureBuffer::GetFormat
The IDirectSoundCaptureBuffer::GetFormat method retrieves the current format of the capture buffer.
HRESULT GetFormat(
LPWAVEFORMATEX lpwfxFormat,
DWORD dwSizeAllocated,
LPDWORD lpdwSizeWritten
);
Parameters
- lpwfxFormat
- Address of the WAVEFORMATEX variable to contain a description of the sound data in the capture buffer. To retrieve the buffer size needed to contain the format description, specify NULL. In this case the DWORD pointed to by the lpdwSizeWritten parameter will receive the size of the structure needed to receive complete format information.
- dwSizeAllocated
- Size, in bytes, of the WAVEFORMATEX structure. DirectSoundCapture writes, at most, dwSizeAllocated bytes to the structure; if the structure requires more memory, it is truncated.
- lpdwSizeWritten
- Address of a variable to receive the number of bytes written to the WAVEFORMATEX structure. This parameter can be NULL.
Return Values
If the method succeeds, the return value is DS_OK.
If the method fails, the return value may be DSERR_INVALIDPARAM.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dsound.h.
Import Library: Use dsound.lib.