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 23AXPBADDR addr; 24 25addr.loopFlag = AXPBADDR_LOOP_ON; 26addr.format = AX_PB_FORMAT_ADPCM; 27addr.loopAddressHi = (u16)(loopAddress >> 16); 28addr.loopAddressLo = (u16)(loopAddress & 0xffff); 29addr.endAddressHi = (u16)(endAddress >> 16); 30addr.endAddressLo = (u16)(endAddress & 0xffff); 31addr.currentAddressHi = (u16)(startAddress >> 16); 32addr.currentAddressLo = (u16)(startAddress & 0xffff); 33 34AXSetVoiceAddr(axvpb, &addr); 35 36#else 37 38int old = OSDisableInterrupts(); 39 40axvpb->addr.loopFlag = AXPBADDR_LOOP_ON; 41axvpb->addr.format = AX_PB_FORMAT_ADPCM; 42axvpb->addr.loopAddressHi = (u16)(loopAddress >> 16); 43axvpb->addr.loopAddressLo = (u16)(loopAddress & 0xffff); 44axvpb->addr.endAddressHi = (u16)(endAddress >> 16); 45axvpb->addr.endAddressLo = (u16)(endAddress & 0xffff); 46axvpb->addr.currentAddressHi = (u16)(startAddress >> 16); 47axvpb->addr.currentAddressLo = (u16)(startAddress & 0xffff); 48 49axvpb->sync |= AX_SYNC_USER_ADDR; 50 51OSRestoreInterrupts(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>03/01/2006 Initial version.</P> 60</BODY> 61</HTML>