AXFXMultiChDelayGetMemSize

Syntax

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

s32 AXFXMultiChDelayGetMemSize (AXFX_MULTI_CH_DELAY *delay);

Parameters

delay Pointer to an AXFX_MULTI_CH_DELAY structure.

Return Values

Returns the size of memory required by the multi channel delay effect structure.

Description

The AXFXMultiChDelayGetMemSize function returns the size of memory (in bytes) dynamically allocated by the multi channel delay effect during initialization. The required memory size depends on the enum values AXFX_DELAY_MODE and AXFX_SAMPLE_RATE initially passed to AXFXMultiChDelayInit. The memory size does not depend on the user configurable parameter values set in the AXFX_MULTI_CH_DELAY structure.

Usage

This call can be made anytime after initializing the effect with AXFXMultiChDelayInit. If the effect has not been initialized, non-user parameters mode, max_delay, and fs must be set prior to calling this function. The following code demonstrates this situation:

AXFX_MULTI_CH_DELAY delay;

// Choose mode which must match the parameter that will be passed to AXFXMultiChDelayInit.
// Either AXFX_DELAY_MODE_2CH, AXFX_DELAY_MODE_4CH, or AXFX_DELAY_MODE_6CH.
delay.mode = AXFX_DELAY_MODE_2CH;

// Choose a value which matches the rate parameter passed to AXFXMultiChDelayInit.
// Either 32000 or 48000.
delay.fs = 32000;

delay.max_delay = 2000.0;

s32 size = AXFXMultiChDelayGetMemSize(&delay);
NOTE:
The above workaround does not apply to AXFX2 effects.

Return Values

Sound 1 Library
ModeBytes
2ch512008
4ch1024016
6ch1536024
Sound 2 Library @ 32K
ModeBytes
2ch512008
4ch1024016
6ch1536024
Sound 2 Library @ 48K
ModeBytes
2ch768008
4ch1536016
6ch2304024

Availability

Library Version Availability
Sound 2.0 Yes
Sound 1.0 Yes

Do Not Call From

None.

See Also

AXFX_MULTI_CH_DELAY
AXFXMultiChDelayOverview
AXFXMultiChDelayInit
AXFXMultiChDelayShutdown
AXFXMultiChDelaySettingsUpdate
AXFXMultiChDelaySettingsUpdateNoReset
AXFXMultiChDelayCallback
axfxmulticheffects demo

Revision History

2014-02-26 Add related link.
2014-02-12 Pre-init usage example.
2013-05-08 Automated cleanup pass.
2013-03-04 New no-reset API.
2012-05-25 Simplified API.
2012-05-10 Added 2/4/6 channel effects.
2012-04-16 Initial version.


CONFIDENTIAL