IXACTEngine::CreateInMemoryWaveBank

Creates an in-memory wave bank for use by the XACT engine.

STDAPI CreateInMemoryWaveBank(
  void *pvBuffer,
  DWORD dwSize,
  DWORD dwFlags,
  DWORD dwAllocAttributes,
  IXACTWaveBank **ppWaveBank
);

Parameters

pvBuffer
[in] Pointer to the data used to create the wave bank.

Xbox 360:  Memory for this member must be allocated using XMemAlloc when specifying the XACT_FLAG_API_CREATE_MANAGEDATA flag.

Windows:  Memory for this member must be allocated using CoTaskMemAlloc when specifying the XACT_FLAG_API_CREATE_MANAGEDATA flag.

dwSize
[in] Value indicating the size of the data used to create the wave bank.
dwFlags
[in] Flag values indicating how the wave bank should be created. This parameter can be zero or the value shown in the following table.
Value Description
XACT_FLAG_API_CREATE_MANAGEDATA

Indicates that XACT should free the buffer pointed to by the pvBuffer parameter when the wave bank data is released.

Note    XACT will not attempt to free the memory if the buffer allocation fails.

dwAllocAttributes
[in] Flag values that indicate the attributes of the memory buffer pointed to by the pvBuffer parameter.

Xbox 360:  This parameter is needed only if XACT_FLAG_API_CREATE_MANAGEDATA is specified in dwFlags, so that XMemFree can receive the correct values when the XACT frees the buffer. Otherwise, dwAllocAttributes is ignored.

These flags should match the XALLOC_ATTRIBUTES values that were specified to XMemAlloc when the memory buffer pointed to by pvBuffer was allocated.

Windows:  This parameter has no relevance and is ignored.

ppWaveBank
[out] Pointer to a returned IXACTWaveBank object.

Return Values

Returns S_OK if successful, an error code otherwise.

Requirements

Header: Declared in Xact.h.

See Also

IXACTEngine