1#ifndef AUDIO_SYNTHESIS_H
2#define AUDIO_SYNTHESIS_H
5#include <libultra/gbi.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
56#define MAX_UPDATES_PER_FRAME 5
96#define ALIGN(val, amnt) (((val) + (1 << amnt) - 1) & ~((1 << amnt) - 1))
108 s16* aiBuf, s32 inBuf, Acmd* cmd, s32 updateIndex);
114 u16 inBuf, s32 headsetPanSettings, u32 flags);
116 s32 bufLen, s32 flags, s32 leftRight);
Definition internal.h:410
Definition internal.h:383
Definition synthesis.h:58
s32 startPos
Definition synthesis.h:63
s16 * toDownsampleLeft
Definition synthesis.h:61
s16 lengthB
Definition synthesis.h:65
s16 lengthA
Definition synthesis.h:64
s16 * toDownsampleRight
Definition synthesis.h:62
s16 numSamplesAfterDownsampling
Definition synthesis.h:59
s16 chunkLen
Definition synthesis.h:60
Definition synthesis.h:68
s16 * unk28
Definition synthesis.h:88
struct ReverbRingBufferItem items[2][MAX_UPDATES_PER_FRAME]
Definition synthesis.h:89
u8 resampleFlags
Definition synthesis.h:69
u16 reverbGain
Definition synthesis.h:76
s32 unkC
Definition synthesis.h:79
s16 * resampleStateLeft
Definition synthesis.h:85
s16 * left
Definition synthesis.h:82
s16 * unk24
Definition synthesis.h:87
s32 bufSizePerChannel
Definition synthesis.h:80
u8 useReverb
Definition synthesis.h:70
s16 * right
Definition synthesis.h:83
u8 framesLeftToIgnore
Definition synthesis.h:71
u8 curFrame
Definition synthesis.h:72
s16 * resampleStateRight
Definition synthesis.h:86
s16 * unk100
Definition synthesis.h:92
u16 resampleRate
Definition synthesis.h:77
s16 * unkF8
Definition synthesis.h:90
s16 * unkFC
Definition synthesis.h:91
u8 downsampleRate
Definition synthesis.h:73
u16 windowSize
Definition synthesis.h:75
s32 nextRingBufferPos
Definition synthesis.h:78
struct SynthesisReverb::@054127357066234323373230206214007112033153245205 ringBuffer
s16 * unk104
Definition synthesis.h:93
struct SynthesisReverb gSynthesisReverbs[4]
Definition synthesis.c:35
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:154
Acmd * synthesis_save_reverb_ring_buffer(Acmd *, u16, u16, s32, s32)
Definition synthesis.c:118
Acmd * synthesis_resample_and_mix_reverb(Acmd *, s32, s16, s16)
Definition synthesis.c:198
void func_800B6FB4(s32 updateIndexStart, s32 noteIndex)
Definition synthesis.c:125
Acmd * synthesis_load_reverb_ring_buffer(Acmd *, u16, u16, s32, s32)
Definition synthesis.c:111
void prepare_reverb_ring_buffer(s32 chunkLen, u32 updateIndex, s32 reverbIndex)
Definition synthesis.c:62
void synthesis_load_note_subs_eu(s32 updateIndex)
Definition synthesis.c:137
Acmd * note_apply_headset_pan_effects(Acmd *acmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *note, s32 bufLen, s32 flags, s32 leftRight)
Definition synthesis.c:702
Acmd * synthesis_do_one_audio_update(s16 *, s32, Acmd *, s32)
Definition synthesis.c:262
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:56
Acmd * synthesis_save_reverb_samples(Acmd *, s16, s16)
Definition synthesis.c:236
Acmd * load_wave_samples(Acmd *acmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s32 nSamplesToLoad)
Definition synthesis.c:615
Acmd * final_resample(Acmd *acmd, struct NoteSynthesisState *synthesisState, s32 count, u16 pitch, u16 dmemIn, u32 flags)
Definition synthesis.c:633