1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> 2<head> 3<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 4<title>SND_SetupCapture</title> 5<link rel="stylesheet" href="../css/nitro.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.65.1"> 7</head> 8<body> 9<div class="refentry" lang="ja"><a name="IDAFLWT"></a><div class="titlepage"> 10<div></div> 11<div></div> 12</div> 13<h1>SND_SetupCapture <IMG src="../image/NTR.gif" width="24" height="12" border="0" align=middle><IMG src="../image/TWL.gif" width="24" height="12" border="0" align=middle></h1> 14<h2>Syntax</h2> 15<dl> 16<dd><pre class="funcsynopsisinfo"><code>#include <nitro/snd.h></code></pre></dd> 17<dd><pre class="funcprototype"><code class="funcprototype">void SND_SetupCapture( 18 SNDCapture <var>capture</var>, 19 SNDCaptureFormat <var>format</var>, 20 void* <var>buffer_p</var>, 21 u32 <var>length</var>, 22 BOOL <var>loopFlag</var>, 23 SNDCaptureIn <var>in</var>, 24 SNDCaptureOut <var>out</var> );</code><br></pre></dd> 25</dl> 26<div class="refsection" lang="ja"><a name="IDAEOWT"></a> 27 <h2>Arguments</h2> 28 29 <div class="variablelist"> 30<table border="0"> 31<col align="left" valign="top"> 32<tbody> 33<tr> 34<td><em><strong><code>capture</code></strong></em></td> 35<td>The capture identifier.</td> 36</tr> 37<tr> 38<td><em><strong><code>format</code></strong></em></td> 39<td>The format of the capture data</td> 40</tr> 41<tr> 42<td><em><strong><code>buffer_p</code></strong></em></td> 43<td>Starting address of the capture buffer. Must have 4-byte alignment.</td> 44</tr> 45<tr> 46<td><em><strong><code>length</code></strong></em></td> 47<td>The length of the capture buffer. Expressed in units of words. Takes a value of 0 to 0xffff.</td> 48</tr> 49<tr> 50<td><em><strong><code>loopFlag</code></strong></em></td> 51<td>The loop flag.</td> 52</tr> 53<tr> 54<td><em><strong><code>in</code></strong></em></td> 55<td>The capture input.</td> 56</tr> 57<tr> 58<td><em><strong><code>out</code></strong></em></td> 59<td>The capture output.</td> 60</tr> 61</tbody> 62</table> 63</div> 64 65 </div> 66<div class="refsection" lang="ja"><a name="IDA3PWT"></a> 67 <h2>Return Values</h2> 68 69 <p>None.</p> 70 </div> 71<div class="refsection" lang="ja"><a name="IDAHQWT"></a> 72 <h2>Description</h2> 73 <p> 74This function conducts the setup for captures. 75</p> 76 <p> 77The capture frequency is set by the timer of the corresponding channel. The corresponding channel is locked by the <tt class="function"><a href="SND_LockChannel.html">SND_LockChannel</a></tt> function, and then its timer is set by <tt class="function"><a href="SND_SetChannelTimer.html">SND_SetChannelTimer</a></tt> or a similar function. Start capturing with the <tt class="function"><a href="SND_StartTimer.html">SND_StartTimer</a></tt> function. 78</p> 79 <p> 80Select from among the following values for the capture identifier <code>capture</code>: 81</p> 82 <div class="table"><a name="IDAERWT"></a><p class="title"><b><b>Table. SNDCapture</b></b></p> 83<table summary="SNDCapture" border="1"> 84<colgroup><col><col></colgroup> 85<thead> 86<tr> 87<th>Label</th> 88<th>Description</th> 89</tr> 90</thead> 91<tbody> 92<tr> 93<td>SND_CAPTURE_0</td> 94<td>Capture 0. This captures the output from the L mixer or channel 0. The timer is shared with channel 1.</td> 95</tr> 96<tr> 97<td>SND_CAPTURE_1</td> 98<td>Capture 1. This captures the output from the R mixer or channel 2. The timer is shared with channel 3.</td> 99</tr> 100</tbody> 101</table> 102</div> 103 104 <p> 105Select from among the following values for the capture data format <code>format</code>: 106</p> 107 <div class="table"><a name="IDANSWT"></a><p class="title"><b><b>Table. SNDCaptureFormat</b></b></p> 108<table summary="SNDCaptureFormat" border="1"> 109<colgroup><col><col></colgroup> 110<thead> 111<tr> 112<th>Label</th> 113<th>Description</th> 114</tr> 115</thead> 116<tbody> 117<tr> 118<td>SND_CAPTURE_FORMAT_PCM8</td> 119<td>8-bit PCM</td> 120</tr> 121<tr> 122<td>SND_CAPTURE_FORMAT_PCM16</td> 123<td>16-bit PCM</td> 124</tr> 125</tbody> 126</table> 127</div> 128 129 <p> 130The capture buffer's starting address <code>buffer_p</code> must have 4-byte alignment.<br>The capture buffer length <code>length</code> is specified in units of words. 131</p> 132 <p> 133If the loop flag <code>loopFlag</code> is set to TRUE, the capture will continue again from the start of the buffer when the end of the buffer is reached during the capture. If <code>loopFlag</code> is set to FALSE, the capture will halt automatically when the capture reaches the end of the capture buffer. 134</p> 135 <p> 136Select from among the following values for the capture input <code>in</code>: 137</p> 138 <div class="table"><a name="IDACUWT"></a><p class="title"><b><b>Table. SNDCaptureIn</b></b></p> 139<table summary="SNDCaptureIn" border="1"> 140<colgroup><col><col></colgroup> 141<thead> 142<tr> 143<th>Label</th> 144<th>Description</th> 145</tr> 146</thead> 147<tbody> 148<tr> 149<td>SND_CAPTURE_IN_MIXER</td> 150<td>Captures output from the L mixer or the R mixer.</td> 151</tr> 152<tr> 153<td>SND_CAPTURE_IN_CHANNEL</td> 154<td>Captures the output from the channel adder.</td> 155</tr> 156</tbody> 157</table> 158</div> 159 160 <p> 161Select from among the following values for the capture output <code>out</code>: 162</p> 163 <div class="table"><a name="IDALVWT"></a><p class="title"><b><b>Table. SNDCaptureOut</b></b></p> 164<table summary="SNDCaptureOut" border="1"> 165<colgroup><col><col></colgroup> 166<thead> 167<tr> 168<th>Label</th> 169<th>Description</th> 170</tr> 171</thead> 172<tbody> 173<tr> 174<td>SND_CAPTURE_OUT_NORMAL</td> 175<td>Send channel 1 or channel 3 to normal output.</td> 176</tr> 177<tr> 178<td>SND_CAPTURE_OUT_CHANNEL_MIX</td> 179<td>Sends channel 1 output or channel 3 output to the respective channel adder. (It is also sent for normal output.)</td> 180</tr> 181</tbody> 182</table> 183</div> 184 185 <div class="note"> 186<h3 class="title">Note</h3> 187<p> 188There is a problem with the logic for capturing the channel adder output. The capture cannot be done correctly. For details, see the "NITRO Programming Manual." 189</p> 190<p> 191This function is an ARM7 reserved function. After this function is called, its processing will occur only after the command is issued with the <tt class="function"><a href="SND_FlushCommand.html">SND_FlushCommand</a></tt> function. 192</p> 193<p> 194If program execution must be synchronized with process completion, first use the <tt class="function"><a href="SND_GetCurrentCommandTag.html">SND_GetCurrentCommandTag</a></tt> function to obtain the command tag immediately after calling this function. Then, after the command is issued, use the command tag and call either the <tt class="function"><a href="SND_IsFinishedCommandTag.html">SND_IsFinishedCommandTag</a></tt> or <tt class="function"><a href="SND_WaitForCommandProc.html">SND_WaitForCommandProc</a></tt> function to confirm that processing has finished or to wait for it to complete. 195</p> 196</div> 197 </div> 198<h2>See Also</h2> 199<p><code><a href="SND_LockChannel.html">SND_LockChannel</a>, <a href="SND_SetChannelTimer.html">SND_SetChannelTimer</a>, <a href="SND_StartTimer.html">SND_StartTimer</a>, <a href="SND_FlushCommand.html">SND_FlushCommand</a>, <a href="SND_GetCurrentCommandTag.html">SND_GetCurrentCommandTag</a>, <a href="SND_IsFinishedCommandTag.html">SND_IsFinishedCommandTag</a>, <a href="SND_WaitForCommandProc.html">SND_WaitForCommandProc</a></code></p> 200<h2>Revision History</h2> 201<p> 2022005/06/13 Made changes following revisions to the <I>NITRO Programming Manual</I>. <br>2005/02/07 Added notes concerning ARM7 command processing. <br>2005/01/06 Deleted TEG descriptions. <br>2004/07/20 Initial version. 203</p> 204</div> 205<hr><p>CONFIDENTIAL</p></body> 206</html> 207