Microsoft DirectX 8.0 (C++) |
Retrieves information about the wave format specified in the DMUS_PORTPARAMS8 structure passed to IDirectMusic8::CreatePort, and the recommended size of the buffer to use for wave output. The information can be used to create a compatible DirectSound buffer for the port.
HRESULT GetFormat( LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize LPDWORD pdwBufferSize );
Return values are determined by the implementation. If the method succeeds, it returns S_OK.
If it fails, the method can return E_POINTER.
The WAVEFORMATEX structure can have a variable length that depends on the details of the format. Before retrieving the format description, the application should query the synthesizer object for the size of the format by calling this method and specifying NULL for the pWaveFormatEx parameter. The size of the structure is returned in the variable pointed to by pdwWaveFormatExSize. The application can then allocate sufficient memory and call GetFormat again to retrieve the format description.
If pWaveFormatEx is not NULL, DirectMusic writes, at most, pdwWaveFormatExSize bytes to the structure.
Header: Declared in dmusicc.h.