1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
5<meta http-equiv="Content-Style-Type" content="text/css" />
6<title>DSP_LoadG711</title>
7<link rel="stylesheet" href="../../css/nitro.css" type="text/css" />
8</head>
9<body>
10
11<h1>DSP_LoadG711 <IMG src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13
14<pre><code>
15BOOL DSP_LoadG711(FSFile *file, int slotB, int slotC);
16</code></pre>
17
18<h2>Arguments</h2>
19<table style="width:100%">
20<tbody>
21<tr>
22<td style="width:13%"><em><strong>file</strong></em></td>
23<td style="width:87%">G.711 component file.<br />You must either provide this using the <code><a href="DSP_OpenStaticComponentG711.html">DSP_OpenStaticComponentG711</a></code> function, or open the <CODE>$TwlSDK/dspcomponents/audio/audio.a</CODE> file image that was saved to ROM in advance. The file will be used within this function alone and does not need to be maintained after the function has been called.</td>
24</tr>
25<tr>
26<td style="width:13%"><em><strong>slotB</strong></em></td>
27<td style="width:87%">Bit field that shows the WRAM-B slots that may be used for DSP code memory.<br />For example, this would be specified as <CODE>(1&lt;&lt;4)|(1&lt;&lt;5)|(1&lt;&lt;6)=0x70</CODE> to provide slots 4, 5, and 6 for the DSP.</td>
28</tr>
29<tr>
30<td style="width:13%"><em><strong>slotC</strong></em></td>
31<td style="width:87%">Bit field that shows the WRAM-C slots that may be used for DSP code memory.<br />For example, this would be specified as <CODE>(1&lt;&lt;4)|(1&lt;&lt;5)|(1&lt;&lt;6)=0x70</CODE> to provide slots 4, 5, and 6 for the DSP.</td>
32</tr>
33</tbody>
34</table>
35
36
37<h2>Return Values</h2>
38<p>Returns <CODE>TRUE</CODE> if the G.711 component was successfully loaded to the DSP.<br />Returns <CODE>FALSE</CODE> if loading failed due to an insufficient number of open WRAM-B or WRAM-C slots.</p>
39
40<h2>Description</h2>
41<p>Loads to the DSP a component to support the G.711 encoding. Calling this function allows you to use the following functions.</p>
42<ul><code>
43<li><a href="DSP_EncodeG711.html">DSP_EncodeG711()</a></li>
44<li><a href="DSP_DecodeG711.html">DSP_DecodeG711()</a></li>
45<li><a href="DSP_WaitForG711.html">DSP_WaitForG711()</a></li>
46<li><a href="DSP_TryWaitForG711.html">DSP_TryWaitForG711()</a></li>
47</code></ul>
48<p>While loading, the library will automatically allocate only the necessary number of WRAM-B and WRAM-C slots out of those specified. The number of required WRAM-B and WRAM-C slots are each defined by the following macros.</p>
49<ul>
50<li>DSP_SLOT_B_COMPONENT_G711</li>
51<li>DSP_SLOT_C_COMPONENT_G711</li>
52</ul>
53<p>You can use the <code><a href="DSP_UnloadG711.html">DSP_UnloadG711</a></code> function to unload the G.711 component if it is no longer necessary.</p>
54
55<h2>Note</h2>
56<ul>
57<li>Always specify only component files that are saved in the SDK library currently being used. Operations will not be guaranteed if the versions do not match each other.</li>
58</ul>
59
60
61<h2>See Also</h2>
62<p><code><a href="DSP_OpenStaticComponentG711.html">DSP_OpenStaticComponentG711</a> <a href="DSP_UnloadG711.html">DSP_UnloadG711</a> <a href="DSP_EncodeG711.html">DSP_EncodeG711</a> <a href="DSP_DecodeG711.html">DSP_DecodeG711</a> <a href="DSP_WaitForG711.html">DSP_WaitForG711</a></code></p>
63
64<h2>Revision History</h2>
65<p>
662008/06/13 Added definitions for the number of WRAM slots required for loading components. <br />2008/05/22 Changed the structure of the arguments. <br />2008/03/04 Revised the title. <br />2008/02/21 Initial version.
67</p>
68<hr><p>CONFIDENTIAL</p></body>
69</html>
70