Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The IDirectSoundBuffer::GetFormatmethod retrieves a description of the format of the sound data in the buffer, or the buffer size needed to retrieve the format description.
HRESULT GetFormat( LPWAVEFORMATEX lpwfxFormat , DWORD dwSizeAllocated , LPDWORD lpdwSizeWritten );
Parameters
Return Values
If the method succeeds, the return value is DS_OK.
If the method fails, the return value may be DSERR_INVALIDPARAM.
Remarks
The WAVEFORMATEXstructure can have a variable length that depends on the details of the format. Before retrieving the format description, the application should query the DirectSoundBuffer object for the size of the format by calling this method and specifying NULL for the lpwfxFormatparameter. The size of the structure will be returned in the lpdwSizeWrittenparameter. The application can then allocate sufficient memory and call IDirectSoundBuffer::GetFormatagain to retrieve the format description.
Requirements
Runs On | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.12 or later. Version 2.12 requires DXPAK 1.0 or later. | dsound.h | dsound.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
IDirectSoundBuffer, IDirectSoundBuffer::SetFormat