aPan.3p 1.57 KB
.TH aPan 3P local "Silicon Graphics, Inc."
.SH NAME
aPan \- Audio panning command
.SH C SPECIFICATION
#include "mbi.h"
.br
.sp
.nf
typedef short PAN_STATE;
.fi
.sp
aPan(Acmd *pkt, unsigned char flags, short dmemout2, PAN_STATE *state)
.SH PARAMETERS
.TP 10
.I pkt
Audio command list pointer.
.TP
.I flags
Set of flags to define behaviour of the pan command: 

\f2A_MIX\f1, result is mixed into the output buffers.
If not set the result is put into the output buffers.

\f2A_INIT\f1, state is ignored when initiating pan.
If not set the pointer to state is used to initialize the pan.
.TP
.I dmemout2
Second DMEM output buffer. The first is defined through a call
to \f2aSetBuffer()\f1.
.TP
.I state
Pointer to Pan state in DRAM.
.SH DESCRIPTION
.IR aPan 
provides 1 input, 2 output panning. Input, first output
and number of samples to process are set by a call to
.IR aSetBuffer().
The panning parameters (volume, volume rate and volume target)
are set by a call to 
.IR aSetVolume().

The precise trajectory is TBD. 

The output stream is either mixed or put into the output buffer.
The command operates on vectors of 8 samples. 
If the number of samples, defined through the 
.IR aSetBuffer() 
.IR count
parameter, is not a multiple of 8 the command
will produce the smallest multiple of 8 which is greater than count, however,
the state saved to DRAM will reflect the value at the start of the
last block of 8, so that a future call with this state will allow the
last block to be reproduced.
This is used to implement processing of arbitrary length streams, without
the need to save leftover samples.