1#ifndef AUDIO_SYNTHESIS_H
2#define AUDIO_SYNTHESIS_H
7#define DEFAULT_LEN_1CH 0x180
8#define DEFAULT_LEN_2CH 0x300
10#define DMEM_ADDR_TEMP 0x0
11#define DMEM_ADDR_RESAMPLED 0x20
12#define DMEM_ADDR_RESAMPLED2 0x1A0
13#define DMEM_ADDR_UNCOMPRESSED_NOTE 0x180
14#define DMEM_ADDR_NOTE_PAN_TEMP 0x200
15#define DMEM_ADDR_STEREO_STRONG_TEMP_DRY 0x200
16#define DMEM_ADDR_STEREO_STRONG_TEMP_WET 0x340
17#define DMEM_ADDR_COMPRESSED_ADPCM_DATA 0x3f0
18#define DMEM_ADDR_LEFT_CH 0x540
19#define DMEM_ADDR_RIGHT_CH 0x6C0
20#define DMEM_ADDR_WET_LEFT_CH 0x840
21#define DMEM_ADDR_WET_RIGHT_CH 0x9C0
55#define MAX_UPDATES_PER_FRAME 5
95#define ALIGN(val, amnt) (((val) + (1 << amnt) - 1) & ~((1 << amnt) - 1))
107 s16* aiBuf,
s32 inBuf, Acmd* cmd,
s32 updateIndex);
113 u16 inBuf,
s32 headsetPanSettings,
u32 flags);
Definition internal.h:408
Definition internal.h:381
Definition synthesis.h:57
s32 startPos
Definition synthesis.h:62
s16 * toDownsampleLeft
Definition synthesis.h:60
s16 lengthB
Definition synthesis.h:64
s16 lengthA
Definition synthesis.h:63
s16 * toDownsampleRight
Definition synthesis.h:61
s16 numSamplesAfterDownsampling
Definition synthesis.h:58
s16 chunkLen
Definition synthesis.h:59
Definition synthesis.h:67
s16 * unk28
Definition synthesis.h:87
struct ReverbRingBufferItem items[2][MAX_UPDATES_PER_FRAME]
Definition synthesis.h:88
struct SynthesisReverb::@7 ringBuffer
u8 resampleFlags
Definition synthesis.h:68
u16 reverbGain
Definition synthesis.h:75
s32 unkC
Definition synthesis.h:78
s16 * resampleStateLeft
Definition synthesis.h:84
s16 * left
Definition synthesis.h:81
s16 * unk24
Definition synthesis.h:86
s32 bufSizePerChannel
Definition synthesis.h:79
u8 useReverb
Definition synthesis.h:69
s16 * right
Definition synthesis.h:82
u8 framesLeftToIgnore
Definition synthesis.h:70
u8 curFrame
Definition synthesis.h:71
s16 * resampleStateRight
Definition synthesis.h:85
s16 * unk100
Definition synthesis.h:91
u16 resampleRate
Definition synthesis.h:76
s16 * unkF8
Definition synthesis.h:89
s16 * unkFC
Definition synthesis.h:90
u8 downsampleRate
Definition synthesis.h:72
u16 windowSize
Definition synthesis.h:74
s32 nextRingBufferPos
Definition synthesis.h:77
s16 * unk104
Definition synthesis.h:92
Acmd * synthesis_process_note(s32 noteIndex, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s16 *aiBuf, s32 inBuf, Acmd *cmd, s32 updateIndex)
Acmd * synthesis_execute(Acmd *, s32 *, s16 *, s32)
Definition synthesis.c:153
Acmd * synthesis_save_reverb_ring_buffer(Acmd *, u16, u16, s32, s32)
Definition synthesis.c:117
struct SynthesisReverb gSynthesisReverbs[4]
Definition synthesis.c:34
Acmd * synthesis_resample_and_mix_reverb(Acmd *, s32, s16, s16)
Definition synthesis.c:197
void func_800B6FB4(s32 updateIndexStart, s32 noteIndex)
Definition synthesis.c:124
Acmd * synthesis_load_reverb_ring_buffer(Acmd *, u16, u16, s32, s32)
Definition synthesis.c:110
void prepare_reverb_ring_buffer(s32 chunkLen, u32 updateIndex, s32 reverbIndex)
Definition synthesis.c:61
void synthesis_load_note_subs_eu(s32 updateIndex)
Definition synthesis.c:136
Acmd * note_apply_headset_pan_effects(Acmd *acmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *note, s32 bufLen, s32 flags, s32 leftRight)
Definition synthesis.c:696
Acmd * synthesis_do_one_audio_update(s16 *, s32, Acmd *, s32)
Definition synthesis.c:261
Acmd * func_800B86A0(Acmd *cmd, struct NoteSubEu *note, struct NoteSynthesisState *synthesisState, s32 nSamples, u16 inBuf, s32 headsetPanSettings, u32 flags)
#define MAX_UPDATES_PER_FRAME
Definition synthesis.h:55
Acmd * synthesis_save_reverb_samples(Acmd *, s16, s16)
Definition synthesis.c:235
Acmd * load_wave_samples(Acmd *acmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s32 nSamplesToLoad)
Definition synthesis.c:610
Acmd * final_resample(Acmd *acmd, struct NoteSynthesisState *synthesisState, s32 count, u16 pitch, u16 dmemIn, u32 flags)
Definition synthesis.c:627
signed int s32
Definition ultratypes.h:15
unsigned int u32
Definition ultratypes.h:16
signed short int s16
Definition ultratypes.h:13
unsigned short int u16
Definition ultratypes.h:14
unsigned char u8
Definition ultratypes.h:12