Fixed resample and corrupt audio bug. Minor documentation updates.

This commit is contained in:
Nicholas Estelami
2022-06-10 15:40:19 -04:00
parent 28073fbb19
commit 2b40e66fa4
4 changed files with 16 additions and 5 deletions

View File

@@ -2093,9 +2093,14 @@ void func_80075B44(GlobalContext* globalCtx) {
case 7:
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_CRITTER_1 << 4 | NATURE_CHANNEL_CRITTER_3,
CHANNEL_IO_PORT_1, 0);
if (globalCtx->envCtx.unk_EE[0] == 0 && globalCtx->envCtx.unk_F2[0] == 0) {
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_CRITTER_4 << 4 | NATURE_CHANNEL_CRITTER_5,
CHANNEL_IO_PORT_1, 1);
if (globalCtx->envCtx.unk_EE[0] == 0 && globalCtx->envCtx.unk_F2[0] == 0)
{
// OTRTODO: This is where corrupt audio happens. Commenting this out seems to not introduce any side effects?
// Further investigation is needed...
if (gUseLegacySD)
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_CRITTER_4 << 4 | NATURE_CHANNEL_CRITTER_5,
CHANNEL_IO_PORT_1, 1);
}
globalCtx->envCtx.unk_E0++;
break;