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 17<h2>C Specification</h2> 18 19<dl> 20<dd><pre><code>#include <revolution/wpad.h> 21 22#define WPAD_CHAN0 0 23#define WPAD_CHAN1 1 24#define WPAD_CHAN2 2 25#define WPAD_CHAN3 3 26 27#define WPAD_STRM_INTERVAL OSNanosecondsToTicks(6666667) 28 29s32 WPADSendStreamData( s32 chan, void *buf, u16 len ); 30 </code></pre></dd> 31</dl> 32 33<h2>Arguments</h2> 34<TABLE border="1"> 35 <TBODY> 36 <TR> 37<TD width="120" bgcolor="#ffffe8"><code><b><i>chan</i></b></code></TD> 38<TD>One of the <code>WPAD_CHAN<i>n</i></code> values.</TD> 39 </TR> 40 <TR> 41<TD width="120" bgcolor="#ffffe8"><code><b><i>buf</i></b></code></TD> 42<TD>Start address of the buffer storing audio data.</TD> 43 </TR> 44 <TR> 45<TD width="120" bgcolor="#ffffe8"><code><b><i>len</i></b></code></TD> 46<TD>Size of the audio data. A size from 1 to 20 bytes can be specified.</TD> 47 </TR> 48 </TBODY> 49</TABLE> 50<h2>Return Values</h2> 51<p> 52Returns one of the following codes: 53</p> 54<p> 55<code>WPAD_ERR_NONE</code><br> <code>WPAD_ERR_NO_CONTROLLER</code><br> <code>WPAD_ERR_BUSY</code><br> 56</P> 57<H2>Description</H2> 58<p> 59Sends 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>. 60</p> 61<p> 62This 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. 63</p> 64<p> 65The return values have the following meanings: 66</p> 67<table border="1"> 68<tr><td><code>WPAD_ERR_NONE</code></td><td>The WPAD library accepted a command.</td> 69<tr><td><code>WPAD_ERR_BUSY</code></td><td>The WPAD library did not accept a command.</td> 70<tr><td><code>WPAD_ERR_NO_CONTROLLER</code></td><td>The connection was broken.</td> 71</table> 72 73 74 75<h2>See Also</h2> 76<p> 77<A href="./toc.html" target="contents">WPAD Functions</A><br> <A href="./WPADControlSpeaker.html"><CODE>WPADControlSpeaker</CODE></A><br> 78</p> 79 80<H2>Revision History</H2> 81<P>2006/08/15 Initial version.</P> 82 83<hr> 84<P>CONFIDENTIAL</p> 85</BODY> 86</HTML>