AXFX2_DELAY

Syntax

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

typedef struct
{
    // User params
    f32 max_delay_time;    // Unbounded positive delay time in milliseconds
    f32 delay_time;        // 0.0 to max_delay_time
    f32 gain;              // 0.1 to 1.0
    f32 feedback;          // 0.1 to 1.0
    f32 low_pass_amount;   // 0.1 to 1.0
    f32 channel_spread;    // 0.1 to 1.0
    f32 out_gain;          // 0.0 to 1.0
    f32 dry_gain;          // 0.0 to 1.0
} AXFX2_DELAY;

s32  AXFX2DelayGetMemSize            (AXFX2_DELAY *delay, AXFX_DELAY_MODE mode, AXFX_SAMPLE_RATE sampleRate);
BOOL AXFX2DelayInit                  (AXFX2_DELAY *delay, AXFX_DELAY_MODE mode, AXFX_SAMPLE_RATE sampleRate);
void AXFX2DelayShutdown              (AXFX2_DELAY *delay);
BOOL AXFX2DelaySettings              (AXFX2_DELAY *delay);
BOOL AXFX2DelaySettingsUpdate        (AXFX2_DELAY *delay);
BOOL AXFX2DelaySettingsUpdateNoReset (AXFX2_DELAY *delay);
void AXFX2DelayCallback              (AXFX_6CH_BUFFERUPDATE *bufferUpdate, AXFX2_DELAY *delay, AXAUXCBSTRUCT *info);

Elements

max_delay_time Specify a float value in milliseconds as 0.0 <= value. Length of the delay line which determines maximum delay time of input audio. The memory to be used for the delay line is allocated once during initialization.
delay_time Specify a float value in milliseconds as 0.0 <= value <= max_delay_time. Length of the delay which determines delay time of input audio. The memory to be used for the delay line is allocated once during initialization and is set to the max_delay_time parameter.
gain Specify a value as 0.1 <= value <= 1.0. Gain applied to the internal feedback signal.
feedback Specify a value as 0.1 <= value < 1.0. This adjusts the gain of the internal delay line feedback signals.
low_pass_amount Specify a value as 0.1 <= value <= 1.0. Tunes the cut-off frequency of the low-pass filter (LPF). The smaller the value, the lower the cut-off frequency.
channel_spread Specify a value as 0.1 <= value <= 1.0. Determines how much of the sample is distributed to neighboring channels.
out_gain Specify a value as 0.0 <= value <= 1.0. Out gain controls the output level of the processed sound. When this is set to 0.0 no delay effect will be heard, while at high values the effect will be prominent.
dry_gain Specify a value as 0.0 <= value <= 1.0. Dry gain controls the level of the input signal that is added to the processed output.

Description

There are three delay effects that operate on 2, 4, and 6 channels. Appropriate values must be assigned to the parameters of the AXFX2_DELAY structure function before the call to AXFX2DelayInit.

Availability

Library Version Availability
Sound 2.0 Yes
Sound 1.0 No

Performance

The following table lists the CPU utilization given the specified mode and channel settings. The Sound 2 Library Interactive Effects demo displays real time CPU usage metrics from which this data is derived.

mode32k48k
2ch0.40%0.58%
4ch0.75%1.11%
6ch1.06%1.56%

See Also

AXFX2 Delay Overview
AXFX2DelayGetMemSize
AXFX2DelayInit
AXFX2DelayShutdown
AXFX2DelaySettings
AXFX2DelaySettingsUpdate
AXFX2DelaySettingsUpdateNoReset
AXFX2DelayCallback
alleffects demo

Revision History

2014/03/11 CPU metrics
2013/12/12 New max_delay_time parameter.
2013/08/26 Initial version.


CONFIDENTIAL