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
17<h2>C Specification</h2>
18<BLOCKQUOTE>
19<pre><CODE>
20#define AX_SYNC_NONEWPARAMS         0x00000000
21#define AX_SYNC_USER_SRCSELECT      0x00000001
22#define AX_SYNC_USER_MIXCTRL        0x00000002
23#define AX_SYNC_USER_STATE          0x00000004
24#define AX_SYNC_USER_TYPE           0x00000008
25#define AX_SYNC_USER_MIX            0x00000010
26#define AX_SYNC_USER_ITD            0x00000020
27#define AX_SYNC_USER_ITDTARGET      0x00000040
28#define AX_SYNC_USER_DPOP           0x00000080
29#define AX_SYNC_USER_VE             0x00000100
30#define AX_SYNC_USER_VEDELTA        0x00000200
31#define AX_SYNC_USER_ADDR           0x00000400
32#define AX_SYNC_USER_LOOP           0x00000800
33#define AX_SYNC_USER_LOOPADDR       0x00001000
34#define AX_SYNC_USER_ENDADDR        0x00002000
35#define AX_SYNC_USER_CURRADDR       0x00004000
36#define AX_SYNC_USER_ADPCM          0x00008000
37#define AX_SYNC_USER_SRC            0x00010000
38#define AX_SYNC_USER_SRCRATIO       0x00020000
39#define AX_SYNC_USER_ADPCMLOOP      0x00040000
40#define AX_SYNC_USER_LPF            0x00080000
41#define AX_SYNC_USER_LPF_COEF       0x00100000
42#define AX_SYNC_USER_BIQUAD         0x00200000
43#define AX_SYNC_USER_BIQUAD_COEF    0x00400000
44
45#define AX_SYNC_USER_REMOTE         0x00800000
46#define AX_SYNC_USER_RMTMIXCTRL     0x01000000
47#define AX_SYNC_USER_RMTMIX         0x02000000
48#define AX_SYNC_USER_RMTDPOP        0x04000000
49#define AX_SYNC_USER_RMTSRC         0x08000000
50#define AX_SYNC_USER_RMTIIR         0x10000000
51#define AX_SYNC_USER_RMTIIR_COEF1   0x20000000
52#define AX_SYNC_USER_RMTIIR_COEF2   0x40000000
53
54#define AX_SYNC_USER_ALLPARAMS      0x80000000
55
56u32 sync;</CODE></pre>
57</BLOCKQUOTE>
58<h2>Description</h2>
59
60<p>The <code>sync</code> parameter controls synchronization between an application and the DSP parameter blocks. When calling the <code>AXSetVoice*()</code> functions, the appropriate <code>sync</code> flags are asserted automatically. If the application modifies the parameter block values directly, the application is responsible for setting the appropriate <code>sync</code> flags manually. <B>Note:</B> Interrupts must be disabled while modifying the <code>sync</code> flags. AX will reset the <code>sync</code> flags for each audio frame.</p>
61
62<p>Synchronization flags exist as bits which are OR'd into a single 32-bit word. The flags are defined as follows:</p>
63
64<ul>
65<li><code>AX_SYNC_NONEWPARAMS</code> - No parameters have changed. No bits are asserted.
66<li><code>AX_SYNC_USER_SRCSELECT</code> - User changed <code>axvpb.pb.srcSelect</code> or <code>axvpb.pb.coefSelect</code> or both.
67<li><code>AX_SYNC_USER_MIXCTRL</code> - User changed <code>axvpb.pb.mixerCtrl</code>.
68<li><code>AX_SYNC_USER_STATE</code> - User changed <code>axvpb.pb.state</code>.
69<li><code>AX_SYNC_USER_TYPE</code> - User changed <code>axvpb.pb.type</code>.
70<li><code>AX_SYNC_USER_MIX</code> - User changed <code>axvpb.pb.mix.*</code>.
71<li><code>AX_SYNC_USER_ITD</code> - User changed <code>axvpb.pb.itd.*</code>.
72<li><code>AX_SYNC_USER_ITDTARGET</code> - User changed only <code>axvpb.pb.itd.targetShiftL</code> or <code>axvpb.pb.itd.targetShiftR</code>.
73<li><code>AX_SYNC_USER_DPOP</code> - User changed <code>axvpb.pb.depop.*</code>.
74<li><code>AX_SYNC_USER_VE</code> - User changed <code>axvpb.pb.ve.*</code>.
75<li><code>AX_SYNC_USER_VEDELTA</code> - User changed only <code>axvpb.pb.ve.currentDelta</code>.
76<li><code>AX_SYNC_USER_ADDR</code>- User changed <code>axvpb.pb.addr.*</code>.
77<li><code>AX_SYNC_USER_LOOP</code> - User changed the <code>loopFlag</code> parameter only.
78<li><code>AX_SYNC_USER_LOOPADDR</code> - User changed the loop address.
79<li><code>AX_SYNC_USER_ENDADDR</code>- User changed the end address.
80<li><code>AX_SYNC_USER_CURRADDR</code> - User changed the current address.
81<li><code>AX_SYNC_USER_ADPCM</code> - User changed <code>axvpb.pb.adpcm.*</code>.
82<li><code>AX_SYNC_USER_SRC</code> - User changed <code>axvpb.pb.src.*</code>.
83<li><code>AX_SYNC_USER_SRCRATIO</code> - User changed the SRC ratio only.
84<li><code>AX_SYNC_USER_ADPCMLOOP</code> - User changed <code>axvpb.pb.adpcmLoop.*</code>.
85<li><code>AX_SYNC_USER_LPF</code> - User changed <code>axvpb.pb.lpf.*</code>.
86<li><code>AX_SYNC_USER_LPF_COEF</code> - User changed the low-pass filter coefficients only.
87<li><code>AX_SYNC_USER_BIQUAD</code> - User changed <code>axvpb.pb.biquad.*</code>.
88<li><code>AX_SYNC_USER_BIQUAD_COEF</code> - User changed only the BIQUAD filter coefficient.
89<li><code>AX_SYNC_USER_REMOTE</code> - User changed <code>axvpb.pb.remote</code>.
90<li><code>AX_SYNC_USER_RMTMIXCTRL</code> - User changed <code>axvpb.pb.rmtMixerCtrl</code>.
91<li><code>AX_SYNC_USER_RMTMIX</code> - User changed <code>axvpb.pb.rmtMix.*</code>.
92<li><code>AX_SYNC_USER_RMTDPOP</code> - User changed <code>axvpb.pb.rmtDpop.*</code>.
93<li><code>AX_SYNC_USER_RMTSRC</code> - User changed <code>axvpb.pb.rmtSrc.*</code>.
94<li><code>AX_SYNC_USER_RMTIIR</code> - User changed <code>axvpb.pb.rmtIIR.*</code>.
95<li><code>AX_SYNC_USER_RMTIIR_COEF1</code> -  User changed only the low-pass filter coefficient for the Wii Remote speaker.
96<li><code>AX_SYNC_USER_RMTIIR_COEF2</code> -  User changed only the Biquad filter coefficient for the Wii Remote speaker.
97<li><code>AX_SYNC_USER_ALLPARAMS</code> - Update all parameters from the <i>user</i> parameter block to the <i>DSP</i> parameter block.
98</ul>
99
100<p>Some synchronization flags take precedence over others:</p>
101
102<ul>
103<li><code>AX_SYNC_USER_ALLPARAMS</code> will synchronize all parameters.
104<li><code>AX_SYNC_USER_ITDTARGET</code> takes precedence over <code>AX_SYNC_USER_ITD</code>.
105<li><code>AX_SYNC_USER_VEDELTA</code> takes precedence over <code>AX_SYNC_USER_VE</code>.
106<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>.
107<li><code>AX_SYNC_USER_SRCRATIO</code> takes precedence over <code>AX_SYNC_USER_SRC</code>.
108<li><code>AX_SYNC_USER_LPF_COEF</code> takes precedence over <code>AX_SYNC_USER_LPF</code>.
109<li><code>AX_SYNC_USER_BIQUAD_COEF</code> takes precedence over <code>AX_SYNC_USER_BIQUAD</code>.
110<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>.
111</ul>
112
113<p>Some parameters are synchronized from the <i>DSP</i> parameter block to the <i>user</i> parameter block:</p>
114
115<ul>
116<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.
117<li><code>axvpb.pb.ve.currentVolume</code> is updated from the DSP parameter block, unless the <code>AX_SYNC_USER_ALLPARAMS or AX_SYNC_USER_VE</code> flags are asserted.<BR><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.
118<li><code>axvpb.pb.addr.currentAddressHi</code> and <code>axvpb.pb.addr.currentAddressLo</code> are updated from the DSP parameter block, unless the <code>AX_SYNC_USER_ALLPARAMS, AX_SYNC_USER_LOOPADDR, AX_SYNC_USER_ENDADDR, AX_SYNC_USER_CURRADDR, AX_SYNC_USER_LOOP, or AX_SYNC_USER_ADDR</code> flags are asserted. Modifying or polling the <code>currentAddress</code> parameter is useful for implementing software streams.
119</ul>
120
121<h2>Revision History</h2>
122
123<P>
1242006/11/13 Deleted definitions relating to HPF. Added definitions relating to Biquad.  Added definitions relating to RMTIIR. <br>2006/07/26 Added support for the Wii Remote speaker.<br>2006/03/01 Initial version.
125</P>
126<hr>
127<P>CONFIDENTIAL</p>
128</BODY>
129</HTML>
130