WENCGetEncodeData

Syntax

#include <cafe/wenc.h>

#define WENC_FLAG_FIRST  0x00000000
#define WENC_FLAG_CONT   0x00000001

s32 WENCGetEncodeData(WENCInfo*  info,
                      u32        flag,
                      const s16* pbyPcmData,
                      s32        nSampleNum,
                      u8*        pbyEncData);

Parameters

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.

Return Values

Returns the number of encoded samples.

Description

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 after calling WPADControlSpeaker with the command WPAD_SPEAKER_ON and WENC_FLAG_CONT for flag for any subsequent encodings.

info is a pointer to encoding information data allocated by the user. WENCInfo data is initialized and updated inside the library. The contents of the WENCInfo data should not be altered from the application while encoding is continuously taking place.

Do Not Call From

None.

See Also

WPADControlSpeaker

Revision History

2013-05-08 Automated cleanup pass.
2012-08-01 Cleanup pass.
2011-08-05 Initial version.


CONFIDENTIAL