1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
6<title>axvpb.sync</title>
7<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
8<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows">
9<META http-equiv="Content-Style-Type" content="text/css">
10</head>
11
12<body>
13
14<h1 align="left">axvpb.sync</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#define AX_SYNC_NONEWPARAMS         0x00000000
19#define AX_SYNC_USER_SRCSELECT      0x00000001
20#define AX_SYNC_USER_MIXCTRL        0x00000002
21#define AX_SYNC_USER_STATE          0x00000004
22#define AX_SYNC_USER_TYPE           0x00000008
23#define AX_SYNC_USER_MIX            0x00000010
24#define AX_SYNC_USER_ITD            0x00000020
25#define AX_SYNC_USER_ITDTARGET      0x00000040
26#define AX_SYNC_USER_DPOP           0x00000080
27#define AX_SYNC_USER_VE             0x00000100
28#define AX_SYNC_USER_VEDELTA        0x00000200
29#define AX_SYNC_USER_ADDR           0x00000400
30#define AX_SYNC_USER_LOOP           0x00000800
31#define AX_SYNC_USER_LOOPADDR       0x00001000
32#define AX_SYNC_USER_ENDADDR        0x00002000
33#define AX_SYNC_USER_CURRADDR       0x00004000
34#define AX_SYNC_USER_ADPCM          0x00008000
35#define AX_SYNC_USER_SRC            0x00010000
36#define AX_SYNC_USER_SRCRATIO       0x00020000
37#define AX_SYNC_USER_ADPCMLOOP      0x00040000
38#define AX_SYNC_USER_LPF            0x00080000
39#define AX_SYNC_USER_LPF_COEF       0x00100000
40#define AX_SYNC_USER_BIQUAD         0x00200000
41#define AX_SYNC_USER_BIQUAD_COEF    0x00400000
42
43#define AX_SYNC_USER_REMOTE         0x00800000
44#define AX_SYNC_USER_RMTMIXCTRL     0x01000000
45#define AX_SYNC_USER_RMTMIX         0x02000000
46#define AX_SYNC_USER_RMTDPOP        0x04000000
47#define AX_SYNC_USER_RMTSRC         0x08000000
48#define AX_SYNC_USER_RMTIIR         0x10000000
49#define AX_SYNC_USER_RMTIIR_COEF1   0x20000000
50#define AX_SYNC_USER_RMTIIR_COEF2   0x40000000
51
52#define AX_SYNC_USER_ALLPARAMS      0x80000000
53
54u32 sync;
55</pre></dd></dl>
56
57<h2>Description</h2>
58<p>The <SPAN class="argument">sync</SPAN> parameter controls synchronization between an application and the DSP parameter blocks. When calling the <code>AXSetVoice*</code> functions, the appropriate <SPAN class="argument">sync</SPAN> flags are asserted automatically. If the application modifies the parameter block values directly, the application is responsible for setting the appropriate <SPAN class="argument">sync</SPAN> flags manually. <B>Note:</B> Interrupts must be disabled while modifying the <SPAN class="argument">sync</SPAN> flags. AX will reset the <SPAN class="argument">sync</SPAN> flags for each audio frame.</p>
59
60<p>Synchronization flags exist as bits which are OR'd into a single 32-bit word. The flags are defined as follows:</p>
61
62<ul>
63<li><code>AX_SYNC_NONEWPARAMS</code> - No parameters have changed. No bits are asserted.
64<li><code>AX_SYNC_USER_SRCSELECT</code> - User changed <code>axvpb.pb.srcSelect</code> or <code>axvpb.pb.coefSelect</code> or both.
65<li><code>AX_SYNC_USER_MIXCTRL</code> - User changed <code>axvpb.pb.mixerCtrl</code>.
66<li><code>AX_SYNC_USER_STATE</code> - User changed <code>axvpb.pb.state</code>.
67<li><code>AX_SYNC_USER_TYPE</code> - User changed <code>axvpb.pb.type</code>.
68<li><code>AX_SYNC_USER_MIX</code> - User changed <code>axvpb.pb.mix.*</code>.
69<li><code>AX_SYNC_USER_ITD</code> - User changed <code>axvpb.pb.itd.*</code>.
70<li><code>AX_SYNC_USER_ITDTARGET</code> - User changed only <code>axvpb.pb.itd.targetShiftL</code> or <code>axvpb.pb.itd.targetShiftR</code>.
71<li><code>AX_SYNC_USER_DPOP</code> - User changed <code>axvpb.pb.dpop.*</code>.
72<li><code>AX_SYNC_USER_VE</code> - User changed <code>axvpb.pb.ve.*</code>.
73<li><code>AX_SYNC_USER_VEDELTA</code> - User changed only <code>axvpb.pb.ve.currentDelta</code>.
74<li><code>AX_SYNC_USER_ADDR</code>- User changed <code>axvpb.pb.addr.*</code>.
75<li><code>AX_SYNC_USER_LOOP</code> - User changed the <code>loopFlag</code> parameter only.
76<li><code>AX_SYNC_USER_LOOPADDR</code> - User changed the loop address.
77<li><code>AX_SYNC_USER_ENDADDR</code>- User changed the end address.
78<li><code>AX_SYNC_USER_CURRADDR</code> - User changed the current address.
79<li><code>AX_SYNC_USER_ADPCM</code> - User changed <code>axvpb.pb.adpcm.*</code>.
80<li><code>AX_SYNC_USER_SRC</code> - User changed <code>axvpb.pb.src.*</code>.
81<li><code>AX_SYNC_USER_SRCRATIO</code> - User changed the SRC ratio only.
82<li><code>AX_SYNC_USER_ADPCMLOOP</code> - User changed <code>axvpb.pb.adpcmLoop.*</code>.
83<li><code>AX_SYNC_USER_LPF</code> - User changed <code>axvpb.pb.lpf.*</code>.
84<li><code>AX_SYNC_USER_LPF_COEF</code> - User changed the low-pass filter coefficients only.
85<li><code>AX_SYNC_USER_BIQUAD</code> - User changed <code>axvpb.pb.biquad.*</code>.
86<li><code>AX_SYNC_USER_BIQUAD_COEF</code> - User changed only the BIQUAD filter coefficient.
87<li><code>AX_SYNC_USER_REMOTE</code> - User changed <code>axvpb.pb.remote</code>.
88<li><code>AX_SYNC_USER_RMTMIXCTRL</code> - User changed <code>axvpb.pb.rmtMixerCtrl</code>.
89<li><code>AX_SYNC_USER_RMTMIX</code> - User changed <code>axvpb.pb.rmtMix.*</code>.
90<li><code>AX_SYNC_USER_RMTDPOP</code> - User changed <code>axvpb.pb.rmtDpop.*</code>.
91<li><code>AX_SYNC_USER_RMTSRC</code> - User changed <code>axvpb.pb.rmtSrc.*</code>.
92<li><code>AX_SYNC_USER_RMTIIR</code> - User changed <code>axvpb.pb.rmtIIR.*</code>.
93<li><code>AX_SYNC_USER_RMTIIR_COEF1</code> -  User changed only the low-pass filter coefficient for the Wii Remote speaker.
94<li><code>AX_SYNC_USER_RMTIIR_COEF2</code> -  User changed only the Biquad filter coefficient for the Wii Remote speaker.
95<li><code>AX_SYNC_USER_ALLPARAMS</code> - Update all parameters from the <i>user</i> parameter block to the <i>DSP</i> parameter block.
96</ul>
97
98<p>Some synchronization flags take precedence over others:</p>
99
100<ul>
101<li><code>AX_SYNC_USER_ALLPARAMS</code> will synchronize all parameters.
102<li><code>AX_SYNC_USER_ITDTARGET</code> takes precedence over <code>AX_SYNC_USER_ITD</code>.
103<li><code>AX_SYNC_USER_VEDELTA</code> takes precedence over <code>AX_SYNC_USER_VE</code>.
104<li><code>AX_SYNC_USER_LOOPADDR | AX_SYNC_USER_ENDADDR | AX_SYNC_USER_CURRADDR | AX_SYNC_USER_LOOP</code> take precedence over <code>AX_SYNC_USER_ADDR</code>.
105<li><code>AX_SYNC_USER_SRCRATIO</code> takes precedence over <code>AX_SYNC_USER_SRC</code>.
106<li><code>AX_SYNC_USER_LPF_COEF</code> takes precedence over <code>AX_SYNC_USER_LPF</code>.
107<li><code>AX_SYNC_USER_BIQUAD_COEF</code> takes precedence over <code>AX_SYNC_USER_BIQUAD</code>.
108<li><code>AX_SYNC_USER_RMTIIR_COEF1</code> and <code>AX_SYNC_USER_RMTIIR_COEF2</code> take precedence over <code>AX_SYNC_USER_RMTIIR</code>.
109</ul>
110
111<p>Some parameters are synchronized from the <i>DSP</i> parameter block to the <i>user</i> parameter block:</p>
112
113<ul>
114<li><code>axvpb.pb.state</code> is updated from the DSP parameter block, unless the <code>AX_SYNC_USER_ALLPARAMS</code> or <code>AX_SYNC_USER_STATE</code> flags are asserted. The DSP normally sets <code>state</code> to <code>AX_PB_STATE_STOP</code> when 'one-shot' voices have reached the end address. The <code>state</code> parameter can be polled to determine when a 'one-shot' sound has finished playing.
115<li><code>axvpb.pb.ve.currentVolume</code> is updated from the DSP parameter block, unless the <code>AX_SYNC_USER_ALLPARAMS</code> or <code>AX_SYNC_USER_VE</code> flags are asserted. <B>Note: </B>This value is not particularly useful because the value retrieved corresponds to the final value computed by the DSP for the <i>previous</i> 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 <code>MIX</code> library. This synchronization may be removed from future releases of AX.
116<li><code>axvpb.pb.addr</code> is updated from the DSP parameter block, unless any of the <code>AX_SYNC_USER_PARAMS</code>, <code>AX_SYNC_USER_LOOPADDR</code>, <code>AX_SYNC_USER_ENDADDR</code>, <code>AX_SYNC_USER_CURRADDR</code>, <code>AX_SYNC_USER_LOOP</code>, <code>AX_SYNC_USER_ADDR</code>flags are asserted. Modifying or polling the <code>currentAddress</code> parameter is useful for implementing software streams.
117</ul>
118
119<h2>Revision History</h2>
120<P>
1212006/11/13 Deleted definitions relating to HPF. Added definitions relating to Biquad. Added definitions relating to RMTIIR. <br>2006/07/27 Added support for the Wii Remote speaker.<br>2006/03/01 Initial version.<BR>
122</P>
123
124<hr><p>CONFIDENTIAL</p></body>
125</html>
126