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<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<title>AX Profile</title> 10</head> 11 12<body> 13 14<h1 align="left">Profile</h1> 15 16 17<h2>Overview</h2> 18<p>With AX, the application provides profiling routines for determining the CPU load. These routines are used with AX and AUX effect operations and with the user's callback routines. To use a profiling routine, follow the procedure shown below. 19</p> 20<ul> 21<li>Call the <a href="AXInitProfile.html"><code>AXInitProfile</code></a> function to initialize runtime profiling of AX and its child callbacks. 22<li>Call the <a href="AXGetProfile.html"><code>AXGetProfile</code></a> function periodically to retrieve all profiles recorded by AX since the last call to the <a href="AXGetProfile.html"><code>AXGetProfile</code></a> function. 23<li>A profile contains metrics for a single, 3-millisecond audio frame. 24</ul> 25 26<h2>Examples</h2> 27<p>The following is sample code for profiling.</p> 28<BLOCKQUOTE> 29<pre><code>#include <revolution.h> 30 31 ... 32 33 // Initialize AX 34 35#define MAX_PROFILES 256 36 37 AXPROFILE profile[MAX_PROFILES]; 38 39 AXInitProfile(&profile, MAX_PROFILES); 40 41 ... 42 43 // somewhere in the game loop 44 int i; 45 46 i = AXGetProfile(); // retrieve all profiles since last call to AXGetProfile() 47 48 while (i) 49 { 50 // look at profile[i] 51 52 i--; 53 }</CODE></pre> 54</BLOCKQUOTE> 55 56<h2>Revision History</h2> 57<P> 582007/10/02 Revised the entire document after changes to the structure of function reference.<br>2006/03/01 Initial version.<br> 59</P> 60 61<hr><p>CONFIDENTIAL</p></body> 62</html> 63