AXFX2SetMemAllocFns

Syntax

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

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

void AXFX2SetMemAllocFns(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 Multi Channel AXFX Sound 1 Library effects are initialized, memory is allocated for items such as delay line according to the settings for each effect. The AXFX2SetMemAllocFns 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.

The following effects should use AXFXSetHooks instead:

Availability

Library Version Availability
Sound 2.0 No
Sound 1.0 Yes

Do Not Call From

None.

See Also

AXFXSetHooks
AXFX2GetMemAllocFns
The Default Heap

Revision History

2014/02/14 Reverted and updated.
2013/05/14 Initial version.


CONFIDENTIAL