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<TITLE>AXFXSetHooks</TITLE>
7<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
8<META http-equiv="Content-Style-Type" content="text/css">
9</head>
10
11<BODY>
12
13<H1 align="left">AXFXSetHooks</H1>
14
15<H2>C Specification</H2>
16<BLOCKQUOTE>
17<PRE><CODE>#include &lt;revolution.h&gt;
18#include &lt;revolution/axfx.h&gt;
19
20typedef void* (*AXFXAlloc)(u32);
21typedef void  (*AXFXFree) (void*);
22
23void AXFXSetHooks (AXFXAlloc alloc, AXFXFree free);</CODE></PRE>
24</BLOCKQUOTE>
25
26<H2>Arguments</H2>
27<TABLE border="1" cellpadding="3" cellspacing="0.1">
28  <TBODY>
29    <TR>
30<TD width="120" bgcolor="#ffffe8"><EM><STRONG><code>alloc </code></STRONG></EM></TD>
31<TD width="520">Pointer to function used for allocating memory.</TD>
32    </TR>
33    <TR>
34<TD width="120" bgcolor="#ffffe8"><EM><STRONG><code>free</code></STRONG></EM></TD>
35<TD width="520">Pointer to function used for freeing memory.</TD>
36    </TR>
37  </TBODY>
38</TABLE>
39
40<H2>Return Values</H2>
41<P>None.</P>
42
43<H2>Description</H2>
44<P>When the AXFX Library effects are initialized, memory is allocated for items, such as delay line, according to the settings for each effect. The <code>AXFXSetHooks</code> function registers to the AXFX Library the memory allocation/deallocation functions used at this time. This function <EM>must</EM> be called prior to calling any other AXFX functions.</P>
45
46<P>If this function is not called, the AXFX Library will use the <code>OSAlloc</code> and <code>OSFree</code> functions for memory allocation/deallocation.</P>
47
48<H2>See Also</H2>
49<p>
50<code><A href="AXFXGetHooks.html">AXFXGetHooks</A><br></code>
51</p>
52
53<H2>Revision History</H2>
54<P>
552007/08/08 Removed redundant explanations.<br>2006/03/01 Initial version.<br>
56</P>
57
58<hr><p>CONFIDENTIAL</p></body>
59</HTML>
60