AXFXSetHooks

Syntax

#include <cafe.h>
#include <cafe/axfx.h>

typedef void* (*AXFXAlloc)(u32);
typedef void  (*AXFXFree) (void*);

void AXFXSetHooks(AXFXAlloc alloc, AXFXFree free);

Parameters

alloc Pointer to function used for allocating memory.
free Pointer to function used for freeing memory.

Return Values

None.

Description

When the Legacy AXFX Library effects are initialized, memory is allocated for items such as delay line according to the settings for each effect. The AXFXSetHooks function registers to the AXFX Library the memory allocation/deallocation functions used at this time. This function must be called prior to calling any other AXFX functions.

If this function is not called, the AXFX Library will use the MEMAllocFromDefaultHeap and MEMFreeToDefaultHeap functions for memory allocation/deallocation.

These registered memory functions are not used by the Multi Channel effects in the Sound 1 library. For Sound 1 library Multi Channel effects, use AXFX2SetMemAllocFns.

Availability

Library Version Availability
Sound 2.0 Yes
Sound 1.0 Yes

Do Not Call From

None.

See Also

AXFXGetHooks
The Default Heap

Revision History

2014-02-14 Reverted and updated.
2013-05-08 Automated cleanup pass.
2007-08-08 Removed redundant explanations.
2006-03-01 Initial version.


CONFIDENTIAL