EncodeAdpcmData

nn::snd::CTR::EncodeAdpcmData Function

Syntax

void EncodeAdpcmData(
     s16 * pInput,
     u8 * pOutput,
     s32 nSamples,
     s32 sampleRate,
     s32 loopStart,
     s32 loopEnd,
     DspsndAdpcmHeader * pInfo
);

Parameters

Name Description
in pInput Address of the input buffer.
out pOutput Address of the output buffer (must be 4-byte aligned).
in nSamples Number of input samples.
in sampleRate Sampling frequency.
in loopStart Position of the starting sample for loop playback. (Starts from 0.)
in loopEnd Position of the ending sample for loop playback. (Starts from 0.)
out pInfo Address of the header structure.

Return Values

None.

Description

Encodes 16-bit PCM data into DSP-ADPCM format.

For details about looped playback of encoded data, see the documentation for the CTR-SDK Windows tool WaveCodecCtr.dll.

Revision History

2011/12/22
Added text about looped playback.
2010/06/14
Initial version.

CONFIDENTIAL