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>#define AX_SYNC_NONEWPARAMS 0x00000000 20#define AX_SYNC_USER_SRCSELECT 0x00000001 21#define AX_SYNC_USER_MIXCTRL 0x00000002 22#define AX_SYNC_USER_STATE 0x00000004 23#define AX_SYNC_USER_TYPE 0x00000008 24#define AX_SYNC_USER_MIX 0x00000010 25#define AX_SYNC_USER_ITD 0x00000020 26#define AX_SYNC_USER_ITDTARGET 0x00000040 27#define AX_SYNC_USER_UPDATE 0x00000080 28#define AX_SYNC_USER_DPOP 0x00000100 29#define AX_SYNC_USER_VE 0x00000200 30#define AX_SYNC_USER_VEDELTA 0x00000400 31#define AX_SYNC_USER_ADDR 0x00000800 32#define AX_SYNC_USER_LOOP 0x00001000 33#define AX_SYNC_USER_LOOPADDR 0x00002000 34#define AX_SYNC_USER_ENDADDR 0x00004000 35#define AX_SYNC_USER_CURRADDR 0x00008000 36#define AX_SYNC_USER_ADPCM 0x00010000 37#define AX_SYNC_USER_SRC 0x00020000 38#define AX_SYNC_USER_SRCRATIO 0x00040000 39#define AX_SYNC_USER_ADPCMLOOP 0x00080000 40#define AX_SYNC_USER_LPF 0x00100000 41#define AX_SYNC_USER_LPF_COEF 0x00200000 42#define AX_SYNC_USER_HPF 0x00400000 43#define AX_SYNC_USER_HPF_COEF 0x00800000 44 45#define AX_SYNC_USER_REMOTE 0x01000000 46#define AX_SYNC_USER_RMTMIXCTRL 0x02000000 47#define AX_SYNC_USER_RMTMIX 0x04000000 48#define AX_SYNC_USER_RMTDPOP 0x08000000 49#define AX_SYNC_USER_RMTSRC 0x10000000 50 51#define AX_SYNC_USER_ALLPARAMS 0x80000000 52 53u32 sync;</CODE></pre> 54</BLOCKQUOTE> 55<h2>Description</h2> 56 57<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> 58 59<p>Synchronization flags exist as bits which are OR'd into a single 32-bit word. The flags are defined as follows:</p> 60 61<ul> 62<li><code>AX_SYNC_NONEWPARAMS</code> - No parameters have changed. No bits are asserted. 63<li><code>AX_SYNC_USER_SRCSELECT</code> - User changed <code>axvpb.pb.srcSelect</code> or <code>axvpb.pb.coefSelect</code> or both. 64<li><code>AX_SYNC_USER_MIXCTRL</code> - User changed <code>axvpb.pb.mixerCtrl</code>. 65<li><code>AX_SYNC_USER_STATE</code> - User changed <code>axvpb.pb.state</code>. 66<li><code>AX_SYNC_USER_TYPE</code> - User changed <code>axvpb.pb.type</code>. 67<li><code>AX_SYNC_USER_MIX</code> - User changed <code>axvpb.pb.mix.*</code>. 68<li><code>AX_SYNC_USER_ITD</code> - User changed <code>axvpb.pb.itd.*</code>. 69<li><code>AX_SYNC_USER_ITDTARGET</code> - User changed only <code>axvpb.pb.itd.targetShiftL</code> or <code>axvpb.pb.itd.targetShiftR</code>. 70<li><code>AX_SYNC_USER_UPDATE</code> - User changed <code>axvpb.pb.update.*</code>. 71<li><code>AX_SYNC_USER_DPOP</code> - User changed <code>axvpb.pb.depop.*</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><font face="Courier New"><code>AX_SYNC_USER_LPF_COEF</code></font> - User changed the low-pass filter coefficients only. 85<li><code>AX_SYNC_USER_HPF</code> - User changed <code>axvpb.pb.hpf.*</code>. 86<li><font face="Courier New"><code>AX_SYNC_USER_HPF_COEF</code></font> - User changed the high-pass filter coefficients only. 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_ALLPARAMS</code> - Update all parameters from the <i>user</i> parameter block to the <i>DSP</i> parameter block. 93</ul> 94 95<p>Some synchronization flags take precedence over others:</p> 96 97<ul> 98<li><code>AX_SYNC_USER_ALLPARAMS</code> will synchronize all parameters. 99<li><code>AX_SYNC_USER_ITDTARGET</code> takes precedence over <code>AX_SYNC_USER_ITD</code>. 100<li><code>AX_SYNC_USER_VEDELTA</code> takes precedence over <code>AX_SYNC_USER_VE</code>. 101<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>. 102<li><code>AX_SYNC_USER_SRCRATIO</code> takes precedence over <code>AX_SYNC_USER_SRC</code>. 103<li><code>AX_SYNC_USER_LPF_COEF</code> takes precedence over <code>AX_SYNC_USER_LPF</code>. 104<li><CODE>AX_SYNC_USER_HPF_COEF</CODE> takes precedence over <CODE>AX_SYNC_USER_HPF</CODE>. 105</ul> 106 107<p>Some parameters are synchronized from the <i>DSP</i> parameter block to the <i>user</i> parameter block:</p> 108 109<ul> 110<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. 111<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. 112<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. 113</ul> 114 115<h2>Revision History</h2> 116 117<P>03/01/2006 Initial version.</P> 118<P>2006/7/27 Added AX_SYNC_USER_REMOTE, AX_SYNC_USER_RMTMIXCTRL, AX_SYNC_USER_RMTMIX, AX_SYNC_USER_RMTDPOP, and AX_SYNC_USER_RMTSRC. Changed AX_SYNC_USER_ALLPARAMS.</P> 119 120<hr> 121<P>CONFIDENTIAL</p> 122</BODY> 123</HTML> 124