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>Obtaining data for the AX controller speaker</title> 10</head> 11 12<body> 13 14<h1 align="left">Obtaining Data For the Controller Speaker</h1> 15 16<h2>Overview</h2> 17<p>Use the <code>AXRmt*</code> functions to obtain the audio data for the controller speaker.</p> 18 19<h2>Example</h2> 20<p>The following sample code is used to obtain audio data for the controller speaker.</p> 21<BLOCKQUOTE> 22<pre><code>#include <revolution.h> 23 24// Are there 40 or more samples of the audio data synthesized for the controller speaker? 25if (40 <= AXRmtGetSamplesLeft()) 26{ 27 28 // Because there is enough data, the process continues. 29 30 // Process for each of the four controllers. 31 for (chan = 0; chan < 4; chan++) 32 { 33 34 // 40 samples of audio data for controller number <code>chan</code> are copied to the AudioBuffer[]. 35 AXRmtGetSamples(chan, AudioBuffer[chan], 40); 36 37 ... // Process the AudioBuffer[] data. 38 } 39 40 // Advance the pointer, because the controller speaker's audio data was obtained from the AX internal buffer. 41 AXRmtAdvancePtr(40); 42}</CODE></pre> 43</BLOCKQUOTE> 44 45<h2>Revision History</h2> 46<P> 472007/10/02 Revised the entire document following changes to the structure of the function reference.<br>2007/05/10 Revised the sample codes. <br>2006/07/31 Initial version.<br> 48</P> 49 50<hr><p>CONFIDENTIAL</p></body> 51</html> 52