getLoopContext

Syntax

#include "dsptool.h"

typedef struct
{

        // start context
        s16 coef[16];
        u16 gain;
        u16 pred_scale;
        s16 yn1;
        s16 yn2;

        // loop context
        u16 loop_pred_scale;
        s16 loop_yn1;
        s16 loop_yn2;

} ADPCMINFO; 

void getLoopContext(
        u8              *src,           // location of ADPCM buffer in RAM
        ADPCMINFO       *cxt,           // location of adpcminfo
        u32             samples         // samples to desired context
);

Parameters

src This is a pointer to a buffer containing a DSP-ADPCM encoded sample.
cxt This is a pointer to an ADPCMINFO construct. The getLoopContext function will place the loop context information into this construct.
samples This is the offset, in samples, of the loop start position.
NOTE:
This loop start position is not a nibble address; it is the raw sample number at which a loop starts. That is, it is the first sample to be played for the loop. If the loop begins at the first sample, the offset is zero. If the loop begins at the 101st sample, the offset is 100.

Return Values

None.

Description

getLoopContext returns the DSP-ADPCM loop context at a given offset within a sample.

Do Not Call From

Wii U (Host PC only) Do not call this function on the Wii U console. It is available only on the host PC.

Revision History

2013-05-08 Automated cleanup pass.
2011-02-21 Initial version.


CONFIDENTIAL