alAudioFrame.3p 1.69 KB
.TH alAudioFrame 3P local "Silicon Graphics, Inc."

.SH NAME
.upperok
alAudioFrame \- create an audio command list for one frame.

.SH SYNOPSIS
.nf
\f3
.Op c
#include <libaudio.h>
.sp .8v
Acmd    *alAudioFrame(Acmd *cmdList, s32 *cmdLen, s16 *outBuf, s32 outLen);
.Op
\f1
.fi
.SH PARAMETERS
.TP 10
.I cmdList
pointer to the location at which to start writing the audio command list.
.TP 10
.I cmdLen
pointer to the location at which alAudioFrame is to write the length
of the command list it generates.
.TP 10
.I outBuf
pointer to the DRAM location that the audio microcode, when executing
the audio command list generated by alAudioFrame, is to write the
synthesized audio samples.
.TP 10
.I outLen
the number of stereo samples that the audio command list is to generate. 
.SH DESCRIPTION
An audio command list is a sequence of commands or directions that is
interpreted by the RSP audio microcode describing how audio is to be
synthesized.
.I alAudioFrame
generates an audio command list that, when executed on the RSP, will
put a buffer of 
.I outLen
synthesized stereo samples at the DRAM location specified by
.I outBuf. The 
.I outBuf
should contain four bytes for each sample requested by
.I outLen
since stereo 16 bit samples will be generated.
.I alAudioFrame
writes the length, in number of rsp commands (each 8 bytes long), of 
the command list it generates to the signed 32 bit value pointed to by
.I cmdLen.
It also returns a pointer to the next available command list location.

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

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