prime/src/musyx/creverb_fx.c

36 lines
1.2 KiB
C
Raw Normal View History

2022-07-28 15:50:05 +00:00
#include "musyx/musyx_priv.h"
2022-09-18 06:05:46 +00:00
extern bool ReverbSTDCreate(_SND_REVSTD_WORK* rv, f32 coloration, f32 time, f32 mix, f32 damping,
f32 preDelay);
2022-07-28 15:50:05 +00:00
extern void ReverbHIFree(_SND_REVSTD_WORK* rev);
extern void ReverbSTDCallback(s32* left, s32* right, s32* surround, _SND_REVSTD_WORK* rv);
void sndAuxCallbackReverbSTD(u8 reason, SND_AUX_INFO* info, void* user) {
2022-09-18 06:05:46 +00:00
SND_AUX_REVERBSTD* rev;
2022-07-28 15:50:05 +00:00
switch (reason) {
case SND_AUX_REASON_BUFFERUPDATE:
rev = (SND_AUX_REVERBSTD*)user;
if ((u8)rev->tempDisableFX == 0) {
2022-09-18 06:05:46 +00:00
ReverbSTDCallback(info->data.bufferUpdate.left, info->data.bufferUpdate.right,
info->data.bufferUpdate.surround, &rev->rv);
2022-07-28 15:50:05 +00:00
}
case SND_AUX_REASON_PARAMETERUPDATE:
break;
default:
// ASSERT_MSG(FALSE);
break;
}
}
2022-08-05 19:43:46 +00:00
bool sndAuxCallbackPrepareReverbSTD(SND_AUX_REVERBSTD* rev) {
2022-07-28 15:50:05 +00:00
rev->tempDisableFX = 0;
2022-09-18 06:05:46 +00:00
return ReverbSTDCreate(&rev->rv, rev->coloration, rev->time, rev->mix, rev->damping,
rev->preDelay);
2022-07-28 15:50:05 +00:00
}
2022-08-05 19:43:46 +00:00
bool sndAuxCallbackShutdownReverbSTD(SND_AUX_REVERBSTD* rev) {
2022-07-28 15:50:05 +00:00
ReverbSTDFree(&rev->rv);
2022-08-05 19:43:46 +00:00
return TRUE;
2022-07-28 15:50:05 +00:00
}
2022-09-18 06:05:46 +00:00
bool sndAuxCallbackUpdateSettingsReverbSTD(SND_AUX_REVERBSTD* rev) { return FALSE; }