1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 9<title>WPADSendStreamData</title> 10</head> 11 12<body> 13 14<h1>WPADSendStreamData</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/wpad.h> 19 20#define WPAD_CHAN0 0 21#define WPAD_CHAN1 1 22#define WPAD_CHAN2 2 23#define WPAD_CHAN3 3 24 25#define WPAD_STRM_INTERVAL OSNanosecondsToTicks(6666667) 26 27s32 WPADSendStreamData( s32 chan, void *buf, u16 len ); 28</pre></dd></dl> 29 30<h2>Arguments</h2> 31<TABLE class="arguments" border="1" > 32 <TBODY> 33 <TR> 34<TH>chan</TH> 35<TD>One of the <code>WPAD_CHAN<i>n</i></code> values.</TD> 36 </TR> 37 <TR> 38<TH>buf</TH> 39<TD>Start address of the buffer storing audio data.</TD> 40 </TR> 41 <TR> 42<TH>len</TH> 43<TD>Size of the audio data. A size from 1 to 20 bytes can be specified.</TD> 44 </TR> 45 </TBODY> 46</TABLE> 47 48<h2>Return Values</h2> 49<p> 50Returns one of the following codes: 51</p> 52<p> 53<code>WPAD_ERR_NONE</code><br> 54<code>WPAD_ERR_NO_CONTROLLER</code><br> 55<code>WPAD_ERR_BUSY</code><br> 56</P> 57 58<H2>Description</H2> 59<p> 60Sends audio data of 1 to 20 bytes in length to the Wii Remote on the specified channel. Because the Wii Remote can play 4-bit, 6-kHz audio data, be sure to send 20 bytes of data every time interval given by <code>WPAD_STRM_INTERVAL</code>. 61</p> 62<p> 63This function registers the command used to send audio data to the library. The WPAD library processes registered commands when other commands are not running. The processing result of the command for sending audio data registered using this function cannot be obtained. 64</p> 65<p> 66The return values have the following meanings: 67</p> 68<TABLE class="arguments" border="1" > 69<tr><th>WPAD_ERR_NONE</th><td>The WPAD library accepted a command.</td> 70<tr><th>WPAD_ERR_BUSY</th><td>The WPAD library did not accept the command.</td> 71<tr><th>WPAD_ERR_NO_CONTROLLER</th><td>The connection was broken.</td> 72</table> 73 74<h2>See Also</h2> 75<p class="reference"> 76<A href="./WPADControlSpeaker.html">WPADControlSpeaker</A> 77</p> 78 79<H2>Revision History</H2> 80<P> 812006/08/15 Initial version.<br> 82</P> 83 84<hr><p>CONFIDENTIAL</p></body> 85</html>