summaryrefslogtreecommitdiff
path: root/include/rvl/AXFX/AXFXChorusExp.h
blob: 7a432cf0f9650e1946308a70dbb51a7dcd59c9c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef RVL_SDK_AXFX_CHORUS_EXP_H
#define RVL_SDK_AXFX_CHORUS_EXP_H
#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif

// Forward declarations
typedef struct AXFX_BUS;
typedef struct AXFX_BUFFERUPDATE;

typedef struct AXFX_CHORUS_EXP_DELAY {
    f32 *line[3]; // at 0x0
    u32 inPos;    // at 0xC
    u32 outPos;   // at 0x10
    u32 lastPos;  // at 0x14
    u32 sizeFP;   // at 0x18
    u32 size;     // at 0x1C
} AXFX_CHORUS_EXP_DELAY;

typedef struct AXFX_CHORUS_EXP_LFO {
    s32 *table;     // at 0x0
    s32 phaseAdd;   // at 0x4
    s32 stepSamp;   // at 0x8
    s32 depthSamp;  // at 0xC
    u32 phase;      // at 0x10
    u32 sign;       // at 0x14
    u32 lastNum;    // at 0x18
    s32 lastValue;  // at 0x1C
    s32 grad;       // at 0x20
    s32 gradFactor; // at 0x24
} AXFX_CHORUS_EXP_LFO;

typedef struct AXFX_CHORUS_EXP {
    AXFX_CHORUS_EXP_DELAY delay; // at 0x0
    AXFX_CHORUS_EXP_LFO lfo;     // at 0x20
    f32 history[3][4];           // at 0x48
    u32 histIndex;               // at 0x78
    u32 active;                  // at 0x7C
    f32 delayTime;               // at 0x80
    f32 depth;                   // at 0x84
    f32 rate;                    // at 0x88
    f32 feedback;                // at 0x8C
    struct AXFX_BUS *busIn;      // at 0x90
    struct AXFX_BUS *busOut;     // at 0x94
    f32 outGain;                 // at 0x98
    f32 sendGain;                // at 0x9C
} AXFX_CHORUS_EXP;

u32 AXFXChorusExpGetMemSize(const AXFX_CHORUS_EXP *fx);
BOOL AXFXChorusExpInit(AXFX_CHORUS_EXP *fx);
void AXFXChorusExpShutdown(AXFX_CHORUS_EXP *fx);
BOOL AXFXChorusExpSettings(AXFX_CHORUS_EXP *fx);
void AXFXChorusExpCallback(struct AXFX_BUFFERUPDATE *update, AXFX_CHORUS_EXP *fx);

#ifdef __cplusplus
}
#endif
#endif