decode

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 decode(
	u8          *src,   // location of encoded source samples
	s16         *dst,   // location of destination buffer (16 bits / sample)
	ADPCMINFO   *cxt,   // location of adpcm info
	u32         samples // number of samples to decode         
);

Parameters

src Pointer to a buffer containing DSP-ADPCM sample data.
dst Pointer to a buffer which has been allocated for storing the uncompressed PCM data. The size of this buffer may be calculated by calling getBytesForPcmBuffer.
cxt Pointer to a structure of type ADPCMINFO. This structure must contain the coefficient and initial state data which corresponds to the sample being decoded.
samples Number of samples to decode.

Return Values

None.

Description

decode is used to decode a DSP-ADPCM sample into signed, little-endian, 16-bit PCM data.

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