player_fx.h
1.61 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*********************************************************
player_fx.h : Nintendo 64 Music Tools Programmers Library
Version 3.14
Audio library effect support functions.
**********************************************************/
#ifndef _PLAYER_FX_H_
#define _PLAYER_FX_H_
#include "synthInternals.h"
#ifdef SUPPORT_NAUDIO
#include <n_libaudio_sc.h>
#include <n_libaudio_sn_sc.h>
#include "n_synthInternals.h"
#endif
/* public interface to change effects */
int ChangeCustomEffect(s32);
/* internal stuff */
void CustomInit(ALGlobals *, ALSynConfig *); // replacement for alInit()
#ifndef SUPPORT_NAUDIO
#define alInit CustomInit
void CustomSynNew(ALSynth *, ALSynConfig *); // replacement for alSynNew()
ALFxRef *CustomAllocFX(ALSynth *, s16, ALSynConfig *, ALHeap *); // replacement for alSynAllocFX()
#else
#define n_alInit CustomInit
void CustomSynNew(ALSynConfig *); // replacement for alSynNew()
ALFxRef CustomAllocFX(s16, ALSynConfig *, ALHeap *); // replacement for alSynAllocFX()
#endif
/* stuff I've added/altered */
#ifndef SUPPORT_NAUDIO
void CustomFxNew(ALFx *, ALSynConfig *, ALHeap *);
#else
void CustomFxNew(ALFx **, ALSynConfig *, ALHeap *);
#endif
void CustomFxSet(s32 *);
typedef struct
{
/* the synthesizer we;re attached to */
ALSynth *synth;
/* effect description */
int sections;
u32 length;
s32 *pParams;
/* AlFx object attached to the bus */
ALDelay *pDelay;
s16 *pBase;
/* LowPass Filter */
ALResampler *pResampler;
RESAMPLE_STATE *pResampleState;
ALLowPass *pLowPass;
POLEF_STATE *pLpfState;
} REVERB_MEM;
#endif /* _PLAYER_FX_H_ */
/*** end of file ***/