alAudioFrame alAudioFrame (function)

alAudioFrame, n_alAudioFrame

Generates an audio command list


#include <libaudio.h>      /* libaudio.h */
Acmd *alAudioFrame(  Acmd *cmdList, s32 *cmdLen, s16 *outBuf, s32 outLen);
#include <n_libaudio.h>     /* n_libaudio.h */
Acmd *n_alAudioFrame(Acmd *cmdList, s32 *cmdLen, s16 *outBuf, s32 outLen);


Pointer to the location at which to start writing the audio command list

Pointer to the location where alAudioFrame is to write the length of the command list it generates

Pointer to the DRAM location where the audio microcode, when executing the audio command list generated by alAudioFrame, is to write the sample wave form

Number of stereo samples that the audio command list is to generate.


It generates an audio command list that, when executed on the RSP, puts a buffer of outLen-synthesized stereo samples at the DRAM location specified by outBuf.

An audio command list is a sequence of commands or directions that is interpreted by the RSP audio microcode as describing how audio is to be synthesized. The outBuf should contain four bytes for each sample requested by outLen because stereo 16-bit samples are generated. The alAudioFrame function writes the length, in number of RSP commands (each eight bytes long), of the command list it generates to the signed 32-bit value pointed to by the cmdLen argument. It also returns a pointer to the next available command list location.

If there are no players associated with the synthesizer, alAudioFrame sets cmdLen to zero and the application should not send the task to the RSP.

For details on n_audio library, see "Chapter 28: n_audio library" in the N64 Programming Manual.


Note that alAudioFrame does not actually cause the command list to be executed.

Revision History

1999/04/30 Changed Format