1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 5<TITLE>AX Voice Parameters</TITLE> 6<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows"> 8<META http-equiv="Content-Style-Type" content="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">AX Voice Parameters</H1> 12<H2>Overview</H2> 13<UL> 14<LI>Use <code>AXSetVoice*</code> to set voice parameters. 15<LI>Voice parameters can also be set directly using the application in the <code>axvpb</code> data structure. This method can save a few CPU cycles. However, you must assert the appropriate synchronization flags in <code>axvpb.sync</code>. Some parameters depend on other parameter settings for proper operation. 16</UL> 17<H2>Example</H2> 18<BLOCKQUOTE> 19<PRE><code>#include <revolution.h> 20 21#ifdef SET_PARAMS_WITH_AX_API 22 23 AXPBADDR addr; 24 25 addr.loopFlag = AXPBADDR_LOOP_ON; 26 addr.format = AX_PB_FORMAT_ADPCM; 27 addr.loopAddressHi = (u16)(loopAddress >> 16); 28 addr.loopAddressLo = (u16)(loopAddress & 0xffff); 29 addr.endAddressHi = (u16)(endAddress >> 16); 30 addr.endAddressLo = (u16)(endAddress & 0xffff); 31 addr.currentAddressHi = (u16)(startAddress >> 16); 32 addr.currentAddressLo = (u16)(startAddress & 0xffff); 33 34 AXSetVoiceAddr(axvpb, &addr); 35 36#else 37 38 int old = OSDisableInterrupts(); 39 40 axvpb->addr.loopFlag = AXPBADDR_LOOP_ON; 41 axvpb->addr.format = AX_PB_FORMAT_ADPCM; 42 axvpb->addr.loopAddressHi = (u16)(loopAddress >> 16); 43 axvpb->addr.loopAddressLo = (u16)(loopAddress & 0xffff); 44 axvpb->addr.endAddressHi = (u16)(endAddress >> 16); 45 axvpb->addr.endAddressLo = (u16)(endAddress & 0xffff); 46 axvpb->addr.currentAddressHi = (u16)(startAddress >> 16); 47 axvpb->addr.currentAddressLo = (u16)(startAddress & 0xffff); 48 49 axvpb->sync |= AX_SYNC_USER_ADDR; 50 51 OSRestoreInterrupts(old); 52 53#endif 54 55// This is only a code example. You must also set the 56// loop context for ADPCM-encoded sounds.</CODE></PRE> 57</BLOCKQUOTE> 58<H2>Revision History</H2> 59<P>2006/03/01 Initial version.</P> 60<hr> 61<P>CONFIDENTIAL</p> 62</BODY> 63</HTML>