#include <wenc.h> #define WENC_FLAG_FIRST 0x00000000 #define WENC_FLAG_CONT 0x00000001 #define WENC_FLAG_LAST 0x00000002 s32 WENCGetEncodeData(WENCInfo* info, u32 flag, const s16* pbyPcmData, s32 nSampleNum, u8* pbyEncData);
info |
Represents a pointer to the encoding information data. |
flag |
Represents an encode flag. |
pbyPcmData |
Represents a pointer to the PCM data to be encoded. |
nSampleNum |
Represents the number of samples to be encoded. |
pbyEncData |
Pointer to the location where encoded data is to be output. |
Returns the number of encoded samples.
The WENCGetEncodeData function gets the number of samples of PCM data given by nSampleNum from the buffer specified by pbyPcmData and encodes that data for output by the controller speaker. Encoded data is output to pbyEncData.
flag is a flag used to control encoding. Be sure to specify WENC_FLAG_FIRST for flag for the first encoding and WENC_FLAG_CONT for flag for any subsequent encodings. Also, be sure to specify WENC_FLAG_LAST for the final encoding.
info is a pointer to encoding information data allocated by the user. IWENCInfo data is initialized and updated inside the library. During the continuous encoding period (period between WENC_FLAG_FIRST and WENC_FLAG_LAST) applications should not change the content of data in WENCInfo.
07/31/2006 Initial version.
CONFIDENTIAL