Share via


IXACTEngine::PrepareInMemoryWave

IXACTEngine::PrepareInMemoryWave

Creates an in-memory IXACTWave object from data that is already resident in memory.

[Code-driven]

  HRESULT 
  PrepareInMemoryWave(
  DWORD dwFlags,
  WAVEBANKENTRY entry,
  DWORD *pdwSeekTable,
  BYTE *pbWaveData,
  DWORD dwPlayOffset,
  XACTLOOPCOUNT nLoopCount,
  IXACTWave **ppWave
);

Parameters

  • dwFlags
    Flags that affect wave preparation:
  • entry
    WAVEBANKENTRY structure that describes the format, play region, and loop region for the wave. Set the play region length to be the buffer size, in bytes.
  • pdwSeekTable
    Pointer to the seek table. The first DWORD in this table must be the count of entries in the seek table.
  • pbWaveData
    Pointer to wave data. The size of the wave data is determined by the length of the play region that is described in the WAVEBANKENTRY structure that is passed in.
  • dwPlayOffset
    Play offset to use as the start of the wave. The offset can be described in milliseconds or in samples. The dwFlags argument determines the offset units.
  • nLoopCount
    Loop count for the wave.
  • ppWave
    Pointer to an IXACTWave object that is returned.

Return Values

Returns S_OK if successful. Otherwise, an error code.

Remarks

The application must make sure that the any buffers passed in (data, seek table) are valid through the lifetime of this wave.

Xbox 360:  If this API is used to prepare XMA content, the content must be encoded with 64K block size. When using XMAEncode, specify "/b 64" on the command line to create 64K blocks.

Requirements

Header: Declared in Xact.h.

Library: Use Xact.lib.

See Also

IXACTEngine