AXFXMultiChChorusGetMemSize

Syntax

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

s32  AXFXMultiChChorusGetMemSize (AXFX_MULTI_CH_CHORUS *chorus);

Parameters

chorus Pointer to an AXFX_MULTI_CH_CHORUS structure with configured user parameters.

Return Values

Returns the size of memory (in bytes) required by the multi channel chorus effect.

Description

The AXFXMultiChChorusGetMemSize function returns the size of memory (in bytes) dynamically allocated by the multi channel chorus effect during initialization. The required memory size depends only on the enum value AXFX_CHORUS_MODE initially passed to AXFXMultiChChorusInit. The memory size does not depend on the user configurable parameter values set in the AXFX_MUTLI_CH_CHORUS structure nor the enum value AXFX_SAMPLE_RATE passed to AXFXMultiChChorusInit.

Usage

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

AXFX_MULTI_CH_CHORUS chorus;

// Choose mode which must match the parameter that will be passed to AXFXMultiChChorusInit.
// Either AXFX_CHORUS_MODE_2CH, AXFX_CHORUS_MODE_4CH, or AXFX_CHORUS_MODE_6CH.
chorus.mode = AXFX_CHORUS_MODE_2CH;

s32 size = AXFXMultiChChorusGetMemSize(&chorus);
NOTE:
If the chorus is to be used with modes AXFX_CHORUS_MODE_2CH_2, AXFX_CHORUS_MODE_4CH_2, or AXFX_CHORUS_MODE_6CH_2 then this technique cannot be used. In these modes, AXFXMultiChChorusInit must be called first before calling this function.
NOTE:
The above workaround does not apply to AXFX2 effects.

Return Values

Sound 1 Library
ModeBytes
2ch25600
4ch51200
6ch76800
2ch_238556
4ch_276964
6ch_2115372
Sound 2 Library @ 32K
ModeBytes
2ch25600
4ch51200
6ch76800
2ch_225756
4ch_251364
6ch_276972
Sound 2 Library @ 48K
ModeBytes
2ch25600
4ch51200
6ch76800
2ch_238556
4ch_276964
6ch_2115372

Availability

Library Version Availability
Sound 2.0 Yes
Sound 1.0 Yes

Do Not Call From

None.

See Also

AXFX_MULTI_CH_CHORUS
AXFXMultiChChorusOverview
AXFXMultiChChorusInit
AXFXMultiChChorusShutdown
AXFXMultiChChorusSettings
AXFXMultiChChorusSettingsUpdate
AXFXMultiChChorusSettingsUpdateNoReset
AXFXMultiChChorusCallback
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-10 Initial version.


CONFIDENTIAL