#include <cafe/ax.h> s32 AXGetAdpcmData(s16* input, s32 samples, s32 rate, s32 loop_start, s32 loop_end, u8* output, DSPADPCM* info, void* work);
|input||Specifies the 16-bit PCM data to encode in DSP-ADPCM format.|
|samples||Specifies the number of samples to encode. This function outputs DSP-ADPCM data in frames of 8 bytes for every 14 samples. If samples is not a multiple of 14, the final frame is padded with zeros equivalent in amount to the number of missing samples. However, the return value (number of samples encoded) does not include this padding.|
|rate||Specifies the sampling frequency of the PCM data. This function does not perform any sort of resampling, so the DSP-ADPCM data will be output with the same sampling frequency.|
|loop_start||Specifies the starting loop position. Specify the value relative to 0 as the origin. If loop_start is specified using negative numbers, or the loop position is otherwise set inappropriately, the data is encoded as non-looping.|
|loop_end||Specifies the ending loop position. Specify the value relative to 0 as the origin. Leave one or more samples between the start of the loop and the end, and always set the end of the loop to a larger value than the start of the loop. If loop_end is specified using negative numbers, or the loop position is otherwise set inappropriately, the data is encoded as non-looping.|
|output||Specifies the location to output DSP-ADPCM data. The
|info||Specifies the location to output information for the DSP-ADPCM data.|
|work||Specifies the work area that this function uses during encoding. The
Returns the number of samples that were actually encoded (excluding padding).
This function encodes monaural 16-bit (big-endian) PCM data in DSP-ADPCM format so that it can be handled by an audio DSP.
2013/05/08 Automated cleanup pass.
2008/12/19 Revised the description of how padding is handled.
2008/02/26 Initial version.