2022-07-28 15:50:05 +00:00
|
|
|
#include "musyx/musyx_priv.h"
|
|
|
|
|
2022-08-05 19:43: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) {
|
|
|
|
SND_AUX_REVERBSTD* rev ;
|
|
|
|
switch (reason) {
|
|
|
|
case SND_AUX_REASON_BUFFERUPDATE:
|
|
|
|
rev = (SND_AUX_REVERBSTD*)user;
|
|
|
|
if ((u8)rev->tempDisableFX == 0) {
|
|
|
|
ReverbSTDCallback(info->data.bufferUpdate.left, info->data.bufferUpdate.right, info->data.bufferUpdate.surround,
|
|
|
|
&rev->rv);
|
|
|
|
}
|
|
|
|
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;
|
|
|
|
return ReverbSTDCreate(&rev->rv, rev->coloration, rev->time, rev->mix, rev->damping, rev->preDelay);
|
|
|
|
}
|
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-08-05 19:43:46 +00:00
|
|
|
bool sndAuxCallbackUpdateSettingsReverbSTD(SND_AUX_REVERBSTD* rev) {
|
|
|
|
return FALSE;
|
2022-07-28 15:50:05 +00:00
|
|
|
}
|