#define AX_SYNC_NONEWPARAMS 0x00000000 #define AX_SYNC_USER_SRCSELECT 0x00000001 #define AX_SYNC_USER_MIXCTRL 0x00000002 #define AX_SYNC_USER_STATE 0x00000004 #define AX_SYNC_USER_TYPE 0x00000008 #define AX_SYNC_USER_MIX 0x00000010 #define AX_SYNC_USER_ITD 0x00000020 #define AX_SYNC_USER_ITDTARGET 0x00000040 #define AX_SYNC_USER_DPOP 0x00000080 #define AX_SYNC_USER_VE 0x00000100 #define AX_SYNC_USER_VEDELTA 0x00000200 #define AX_SYNC_USER_ADDR 0x00000400 #define AX_SYNC_USER_LOOP 0x00000800 #define AX_SYNC_USER_LOOPADDR 0x00001000 #define AX_SYNC_USER_ENDADDR 0x00002000 #define AX_SYNC_USER_CURRADDR 0x00004000 #define AX_SYNC_USER_ADPCM 0x00008000 #define AX_SYNC_USER_SRC 0x00010000 #define AX_SYNC_USER_SRCRATIO 0x00020000 #define AX_SYNC_USER_ADPCMLOOP 0x00040000 #define AX_SYNC_USER_LPF 0x00080000 #define AX_SYNC_USER_LPF_COEF 0x00100000 #define AX_SYNC_USER_BIQUAD 0x00200000 #define AX_SYNC_USER_BIQUAD_COEF 0x00400000 #define AX_SYNC_USER_REMOTE 0x00800000 #define AX_SYNC_USER_RMTMIXCTRL 0x01000000 #define AX_SYNC_USER_RMTMIX 0x02000000 #define AX_SYNC_USER_RMTDPOP 0x04000000 #define AX_SYNC_USER_RMTSRC 0x08000000 #define AX_SYNC_USER_RMTIIR 0x10000000 #define AX_SYNC_USER_RMTIIR_COEF1 0x20000000 #define AX_SYNC_USER_RMTIIR_COEF2 0x40000000 #define AX_SYNC_USER_ALLPARAMS 0x80000000 u32 sync;
The sync parameter controls synchronization between an application and the DSP parameter blocks. When calling the AXSetVoice* functions, the appropriate sync flags are asserted automatically. If the application modifies the parameter block values directly, the application is responsible for setting the appropriate sync flags manually. Note: Interrupts must be disabled while modifying the sync flags. AX will reset the sync flags for each audio frame.
Synchronization flags exist as bits which are OR'd into a single 32-bit word. The flags are defined as follows:
AX_SYNC_NONEWPARAMS - No parameters have changed. No bits are asserted.
AX_SYNC_USER_SRCSELECT - User changed axvpb.pb.srcSelect or axvpb.pb.coefSelect or both.
AX_SYNC_USER_MIXCTRL - User changed axvpb.pb.mixerCtrl.
AX_SYNC_USER_STATE - User changed axvpb.pb.state.
AX_SYNC_USER_TYPE - User changed axvpb.pb.type.
AX_SYNC_USER_MIX - User changed axvpb.pb.mix.*.
AX_SYNC_USER_ITD - User changed axvpb.pb.itd.*.
AX_SYNC_USER_ITDTARGET - User changed only axvpb.pb.itd.targetShiftL or axvpb.pb.itd.targetShiftR.
AX_SYNC_USER_DPOP - User changed axvpb.pb.dpop.*.
AX_SYNC_USER_VE - User changed axvpb.pb.ve.*.
AX_SYNC_USER_VEDELTA - User changed only axvpb.pb.ve.currentDelta.
AX_SYNC_USER_ADDR- User changed axvpb.pb.addr.*.
AX_SYNC_USER_LOOP - User changed the loopFlag parameter only.
AX_SYNC_USER_LOOPADDR - User changed the loop address.
AX_SYNC_USER_ENDADDR- User changed the end address.
AX_SYNC_USER_CURRADDR - User changed the current address.
AX_SYNC_USER_ADPCM - User changed axvpb.pb.adpcm.*.
AX_SYNC_USER_SRC - User changed axvpb.pb.src.*.
AX_SYNC_USER_SRCRATIO - User changed the SRC ratio only.
AX_SYNC_USER_ADPCMLOOP - User changed axvpb.pb.adpcmLoop.*.
AX_SYNC_USER_LPF - User changed axvpb.pb.lpf.*.
AX_SYNC_USER_LPF_COEF - User changed the low-pass filter coefficients only.
AX_SYNC_USER_BIQUAD - User changed axvpb.pb.biquad.*.
AX_SYNC_USER_BIQUAD_COEF - User changed only the BIQUAD filter coefficient.
AX_SYNC_USER_REMOTE - User changed axvpb.pb.remote.
AX_SYNC_USER_RMTMIXCTRL - User changed axvpb.pb.rmtMixerCtrl.
AX_SYNC_USER_RMTMIX - User changed axvpb.pb.rmtMix.*.
AX_SYNC_USER_RMTDPOP - User changed axvpb.pb.rmtDpop.*.
AX_SYNC_USER_RMTSRC - User changed axvpb.pb.rmtSrc.*.
AX_SYNC_USER_RMTIIR - User changed axvpb.pb.rmtIIR.*.
AX_SYNC_USER_RMTIIR_COEF1 - User changed only the low-pass filter coefficient for the Wii Remote speaker.
AX_SYNC_USER_RMTIIR_COEF2 - User changed only the Biquad filter coefficient for the Wii Remote speaker.
AX_SYNC_USER_ALLPARAMS - Update all parameters from the user parameter block to the DSP parameter block.
Some synchronization flags take precedence over others:
AX_SYNC_USER_ALLPARAMS will synchronize all parameters.
AX_SYNC_USER_ITDTARGET takes precedence over AX_SYNC_USER_ITD.
AX_SYNC_USER_VEDELTA takes precedence over AX_SYNC_USER_VE.
AX_SYNC_USER_LOOPADDR | AX_SYNC_USER_ENDADDR | AX_SYNC_USER_CURRADDR | AX_SYNC_USER_LOOP take precedence over AX_SYNC_USER_ADDR.
AX_SYNC_USER_SRCRATIO takes precedence over AX_SYNC_USER_SRC.
AX_SYNC_USER_LPF_COEF takes precedence over AX_SYNC_USER_LPF.
AX_SYNC_USER_BIQUAD_COEF takes precedence over AX_SYNC_USER_BIQUAD.
AX_SYNC_USER_RMTIIR_COEF1 and AX_SYNC_USER_RMTIIR_COEF2 take precedence over AX_SYNC_USER_RMTIIR.
Some parameters are synchronized from the DSP parameter block to the user parameter block:
axvpb.pb.state is updated from the DSP parameter block, unless the AX_SYNC_USER_ALLPARAMS or AX_SYNC_USER_STATE flags are asserted. The DSP normally sets state to AX_PB_STATE_STOP when 'one-shot' voices have reached the end address. The state parameter can be polled to determine when a 'one-shot' sound has finished playing.
axvpb.pb.ve.currentVolume is updated from the DSP parameter block, unless the AX_SYNC_USER_ALLPARAMS or AX_SYNC_USER_VE flags are asserted. Note: This value is not particularly useful because the value retrieved corresponds to the final value computed by the DSP for the previous audio frame.) The value is volatile and cannot be instantaneously polled. For details regarding the implementation of volume envelopes, please see the source code for the MIX library. This synchronization may be removed from future releases of AX.
axvpb.pb.addr is updated from the DSP parameter block, unless any of the AX_SYNC_USER_PARAMS, AX_SYNC_USER_LOOPADDR, AX_SYNC_USER_ENDADDR, AX_SYNC_USER_CURRADDR, AX_SYNC_USER_LOOP, AX_SYNC_USER_ADDRflags are asserted. Modifying or polling the currentAddress parameter is useful for implementing software streams.
2006/11/13 Deleted definitions relating to HPF. Added definitions relating to Biquad. Added definitions relating to RMTIIR.
2006/07/27 Added support for the Wii Remote speaker.
2006/03/01 Initial version.
CONFIDENTIAL