mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-08-07 18:32:03 -04:00
Readded reverbs but something is still wrong
This commit is contained in:
@@ -122,13 +122,13 @@ struct AdpcmLoop {
|
||||
u32 end;
|
||||
u32 count;
|
||||
u32 pad;
|
||||
s16 state[16]; // only exists if count != 0. 8-byte aligned
|
||||
s16* state; // only exists if count != 0. 8-byte aligned
|
||||
};
|
||||
|
||||
struct AdpcmBook {
|
||||
s32 order;
|
||||
s32 npredictors;
|
||||
s16 book[1]; // size 8 * order * npredictors. 8-byte aligned
|
||||
s16* book; // size 8 * order * npredictors. 8-byte aligned
|
||||
};
|
||||
|
||||
struct AudioBankSample {
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@
|
||||
#define ROUND_DOWN_16(v) ((v) & ~0xf)
|
||||
|
||||
//#define DMEM_BUF_SIZE (0x1000 - 0x0330 - 0x10 - 0x40)
|
||||
#define DMEM_BUF_SIZE 0xC80
|
||||
#define DMEM_BUF_SIZE 0x17D0
|
||||
#define BUF_U8(a) (rspa.buf.as_u8 + (a))
|
||||
#define BUF_S16(a) (rspa.buf.as_s16 + (a) / sizeof(int16_t))
|
||||
|
||||
@@ -319,8 +319,8 @@ void aEnvMixerImpl(uint16_t in_addr, uint16_t n_samples, bool swap_reverb,
|
||||
} while (n > 0);
|
||||
}
|
||||
|
||||
void aMixImpl(uint16_t count, int16_t gain, uint16_t in_addr, uint16_t out_addr) {
|
||||
int nbytes = ROUND_UP_32(ROUND_DOWN_16(count << 4));
|
||||
void aMixImpl(int16_t gain, uint16_t in_addr, uint16_t out_addr, uint16_t count) {
|
||||
int nbytes = ROUND_UP_32(ROUND_DOWN_16(count));
|
||||
int16_t *in = BUF_S16(in_addr);
|
||||
int16_t *out = BUF_S16(out_addr);
|
||||
int i;
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ void aEnvMixerImpl(uint16_t in_addr, uint16_t n_samples, bool swap_reverb,
|
||||
bool neg_left, bool neg_right,
|
||||
uint16_t dry_left_addr, uint16_t dry_right_addr,
|
||||
uint16_t wet_left_addr, uint16_t wet_right_addr);
|
||||
void aMixImpl(uint16_t count, int16_t gain, uint16_t in_addr, uint16_t out_addr);
|
||||
void aMixImpl(int16_t gain, uint16_t in_addr, uint16_t out_addr, uint16_t count);
|
||||
void aS8DecImpl(uint8_t flags, ADPCM_STATE state);
|
||||
void aAddMixerImpl(uint16_t count, uint16_t in_addr, uint16_t out_addr);
|
||||
void aDuplicateImpl(uint16_t count, uint16_t in_addr, uint16_t out_addr);
|
||||
@@ -80,7 +80,7 @@ void aUnkCmd19Impl(uint8_t f, uint16_t count, uint16_t out_addr, uint16_t in_add
|
||||
#define aEnvSetup2(pkt, initialVolLeft, initialVolRight) aEnvSetup2Impl(initialVolLeft, initialVolRight)
|
||||
#define aEnvMixer(pkt, inBuf, nSamples, swapReverb, negLeft, negRight, dryLeft, dryRight, wetLeft, wetRight) \
|
||||
aEnvMixerImpl(inBuf, nSamples, swapReverb, negLeft, negRight, dryLeft, dryRight, wetLeft, wetRight)
|
||||
#define aMix(pkt, c, g, i, o) aMixImpl(c, g, i, o)
|
||||
#define aMix(pkt, g, i, o, c) aMixImpl(g, i, o, c)
|
||||
#define aS8Dec(pkt, f, s) aS8DecImpl(f, s)
|
||||
#define aAddMixer(pkt, s, d, c) aAddMixerImpl(s, d, c)
|
||||
#define aDuplicate(pkt, s, d, c) aDuplicateImpl(s, d, c)
|
||||
|
||||
@@ -293,7 +293,7 @@ Acmd* synthesis_do_one_audio_update(s16* aiBuf, s32 bufLen, Acmd* acmd, s32 upda
|
||||
aClearBuffer(acmd++, DMEM_ADDR_LEFT_CH, DEFAULT_LEN_2CH);
|
||||
i = 0;
|
||||
for (j = 0; j < gNumSynthesisReverbs; j++) {
|
||||
gUseReverb = 0; //gSynthesisReverbs[j].useReverb;
|
||||
gUseReverb = gSynthesisReverbs[j].useReverb;
|
||||
if (gUseReverb != 0) {
|
||||
acmd = synthesis_resample_and_mix_reverb(acmd, bufLen, j, updateIndex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user