IXACTEngine::PrepareWave
IXACTEngine::PrepareWave
Prepares a wave object from a standard PCM, XMA (Xbox 360) file.
[Code-driven]
HRESULT PrepareWave( DWORD dwFlags, PCSTR szWavePath, WORD wStreamingPacketSize, DWORD dwAlignment, DWORD dwPlayOffset, XACTLOOPCOUNT nLoopCount, IXACTWave **ppWave );
Parameters
- dwFlags
Flags that affect wave preparation: - szWavePath
Path to the wave file. - wStreamingPacketSize
Packet Size, in 2 KB increments. If wStreamingPacketSize is 0, the file is an in-memory wave. A fully prepared wave is returned. For streaming waves, the client needs to call IXACTWave::GetState to ensure that the wave is prepared before playback. Loop region information is read from the wave file. - dwAlignment
Alignment of wave data on the media from which it is streamed. This must be at least 2048. Otherwise, it must be a multiple of 2048. - 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
Number of times to loop the file. If there is no loop region, and the loop count is nonzero, the entire wave is looped. - ppWave
Pointer to an IXACTWave object that is returned.
Return Values
Returns S_OK if successful. Otherwise, an error code.
Remarks
If this API is used to prepare XMA content, the content must be encoded by using 64K block size.
Requirements
Header: Declared in Xact.h.
Library: Use Xact.lib.