#define AX_PB_ITD_OFF 0x0000
#define AX_PB_ITD_ON 0x0001
typedef struct _AXPBITD
{
u16 flag; // on or off for this voice
u16 bufferHi; // buffer in RAM
u16 bufferLo; // buffer in RAM
u16 shiftL; // phase shift samples left (current)
u16 shiftR; // phase shift samples right (current)
u16 targetShiftL; // phase shift samples left (target)
u16 targetShiftR; // phase shift samples right (target)
} AXPBITD;
Initial Time Delay (ITD) values specify the phase shift for the main left and right channels of a voice. ITD allows your defined 3D API to better place an emitter in space, by providing up to one millisecond of delay for the right and/or left channels.
The flag variable may have the value of AX_PB_ITD_OFF or AX_PB_ITD_ON.
The bufferHi and bufferLo variables specify the main memory address of a buffer where the "delay samples" are stored. For ITD processing, DSP will DMA these samples into and out of the buffer, as needed. The buffer must be 1-millisecond long (32 samples/millisecond x 2bytes/sample = 64 bytes/millisecond) and 32-byte aligned in main memory. AX provides ITD buffers for all voices; you must not modify these parameters.
The shiftL and shiftR values are used by DSP to store the current time delays of each channel. Do not modify these values.
targetShiftL and targetShiftR are the desired time delay values (measured in 32-kHz samples) for each channel. Be aware that DSP does not immediately apply these values to the delay of each channel. Instead, the DSP will "chase" these values, over time, to prevent popping or rate-conversion artifacts.
Assert the AX_SYNC_USER_ITDTARGET bit in the axvpb.sync word when the targetShiftL or targetShiftR values have changed.
To synchronize the entire structure, assert the AX_SYNC_USER_ITD bit.
axvpb.sync, AXSetVoiceItdOn, AXSetVoiceItdTarget
2006/03/01 Initial version.
CONFIDENTIAL