AXFX_DELAY_EXP/AXFX_DELAY_EXP_DPL2

Syntax

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

/*----------------------------------------------*
    For mono, stereo, surround
 *----------------------------------------------*/

typedef struct AXFX_BUS
{
    s32       *left;
    s32       *right;
    s32       *surround;

} AXFX_BUS;

typedef struct AXFX_DELAY_EXP
{
    // do not touch these!
    s32       *lineL;
    s32       *lineR;
    s32       *lineS;
    u32        curPos;
    u32        length;
    u32        maxLength;
    s32        feedbackGain;
    s32        lastLpfOut[3];
    s32        lpfCoef;
    s32        outGainCalc;
    s32        sendGainCalc;
    u32        active;

    // user params
    f32        maxDelay;  // max delay time (msec) (>0.f)
    f32        delay;     // delay time (msec) (0.f< - <=maxDelay)
    f32        feedback;  // feedback gain (0.f - <1.f)
    f32        lpf;       // LPF param (0.f - 1.f) (cutoff : low - high)

    AXFX_BUS  *busIn;
    AXFX_BUS  *busOut;
    f32        outGain;
    f32        sendGain;
} AXFX_DELAY_EXP;

/*----------------------------------------------*
    For Dolby Pro Logic II
 *----------------------------------------------*/

typedef struct AXFX_BUS_DPL2
{
    s32       *L;
    s32       *R;
    s32       *Ls;
    s32       *Rs;

} AXFX_BUS_DPL2;

typedef struct AXFX_DELAY_EXP_DPL2
{
    // do not touch these!
    s32       *line[4];
    u32        curPos;
    u32        length;
    u32        maxLength;
    s32        feedbackGain;
    s32        lastLpfOut[4];
    s32        lpfCoef;
    s32        outGainCalc;
    s32        sendGainCalc;
    u32        active;

    // user params
    f32        maxDelay;  // max delay time (msec) (>0.f)
    f32        delay;     // delay time (msec) (0.f< - <=maxDelay)
    f32        feedback;  // feedback gain (0.f - <1.f)
    f32        lpf;       // LPF param (0.f - 1.f) (cutoff : low - high)

    AXFX_BUS_DPL2 *busIn;
    AXFX_BUS_DPL2 *busOut;
    f32        outGain;
    f32        sendGain;

} AXFX_DELAY_EXP_DPL2;

Elements

maxDelay Length of the delay line (= maximum delay time of input audio). Specify a value greater than 0.0 (units of msec). The memory to be used for the delay line is allocated according to this value.
delay Delay time (= delay time of input audio). Specify a value as 0.0 <= value <= maxDelay (in msec).
feedback Feedback gain. Specify a value as 0.0 <= value < 1.0.
lpf Tunes the cut-off frequency of the low-pass filter (LPF). Specify a value as 0.0 <= value <= 1.0. The smaller the value, the lower the cut-off frequency.
busIn Specifies the input buffer for effect bus sends.
busOut Specifies the output buffer for effect bus sends.
outGain Output gain. Specify a value as 0.0 <= value <= 1.0.
sendGain Send gain to the next-level effect bus. Specify a value as 0.0 <= value <= 1.0.

Description

When using Delay Expansion, assign appropriate values to the various parameters of the AXFX_DELAY_EXP or AXFX_DELAY_EXP_DPL2 structure. Normally, the AXFX_DELAY_EXP structure is used; AXFX_DELAY_EXP_DPL2 is used with Dolby Pro Logic II.

NOTE:
With the previous version of Delay, it was necessary to configure all parameters separately for each channel; with Delay Expansion, all channels use a common set of parameters, and only these must be configured.

Revision History

2013/05/08 Automated cleanup pass.
2007/08/07 Initial version.


CONFIDENTIAL