mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 01:34:18 +00:00
[ntsc-1.0/1.1] Match audio library (#2243)
* [ntsc-1.0/1.1] Match audio library * Don't include versions.h in audio table headers * Include versions.h where audio tables are used
This commit is contained in:
parent
60f9607569
commit
621b8f38c5
15 changed files with 74 additions and 62 deletions
|
@ -52,6 +52,8 @@
|
|||
#ifndef ASEQ_H
|
||||
#define ASEQ_H
|
||||
|
||||
#include "versions.h"
|
||||
|
||||
/**
|
||||
* IO Ports
|
||||
*/
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define SEQUENCE_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "versions.h"
|
||||
|
||||
#define DEFINE_SEQUENCE(_0, seqId, _2, _3, _4) seqId,
|
||||
#define DEFINE_SEQUENCE_PTR(_0, seqId, _2, _3, _4) seqId,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define SFX_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "versions.h"
|
||||
#include "z64math.h"
|
||||
|
||||
typedef enum SfxBankType {
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
* - Argument 3: Cache load policy for the sequence (AudioCacheLoadType)
|
||||
* - Argument 4: Sequence flags
|
||||
*/
|
||||
#if PLATFORM_N64
|
||||
#define SEQ_0_FLAGS SEQ_FLAG_FANFARE | SEQ_FLAG_ENEMY
|
||||
#else
|
||||
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
|
||||
#define SEQ_0_FLAGS SEQ_FLAG_FANFARE
|
||||
#else
|
||||
#define SEQ_0_FLAGS SEQ_FLAG_FANFARE | SEQ_FLAG_ENEMY
|
||||
#endif
|
||||
DEFINE_SEQUENCE (Sequence_0, NA_BGM_GENERAL_SFX, MEDIUM_CART, CACHE_LOAD_PERMANENT, SEQ_0_FLAGS ) // general_sfx
|
||||
DEFINE_SEQUENCE (Sequence_1, NA_BGM_NATURE_AMBIENCE, MEDIUM_CART, CACHE_LOAD_TEMPORARY, SEQ_FLAG_ENEMY ) // nature_ambience
|
||||
|
|
|
@ -334,10 +334,10 @@
|
|||
/* 0x3942 */ DEFINE_SFX(CHAN_4EA8, NA_SE_EN_BALINADE_THUNDER, 0x34, 3, 0, 0)
|
||||
/* 0x3943 */ DEFINE_SFX(CHAN_415D, NA_SE_EN_BALINADE_BL_SPARK, 0x20, 2, 0, 0)
|
||||
/* 0x3944 */ DEFINE_SFX(CHAN_4184, NA_SE_EN_BALINADE_BL_DEAD, 0x34, 3, 0, 0)
|
||||
#if PLATFORM_N64
|
||||
/* 0x3945 */ DEFINE_SFX(CHAN_4E86, NA_SE_EN_BALINADE_BREAK2, 0x34, 3, 0, 0)
|
||||
#else
|
||||
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
|
||||
/* 0x3945 */ DEFINE_SFX(CHAN_4E86, NA_SE_EN_BALINADE_BREAK2, 0x30, 3, 0, 0)
|
||||
#else
|
||||
/* 0x3945 */ DEFINE_SFX(CHAN_4E86, NA_SE_EN_BALINADE_BREAK2, 0x34, 3, 0, 0)
|
||||
#endif
|
||||
/* 0x3946 */ DEFINE_SFX(CHAN_425D, NA_SE_EN_BALINADE_HIT_RINK, 0x38, 3, 0, 0)
|
||||
/* 0x3947 */ DEFINE_SFX(CHAN_3AF4, NA_SE_EN_GANON_WAVE_GND, 0x20, 3, 0, 0)
|
||||
|
|
|
@ -43,10 +43,10 @@
|
|||
/* 0x281F */ DEFINE_SFX(CHAN_1B61, NA_SE_EV_TBOX_UNLOCK, 0x30, 0, 0, 0)
|
||||
/* 0x2820 */ DEFINE_SFX(CHAN_1B7D, NA_SE_EV_TBOX_OPEN, 0x30, 0, 0, 0)
|
||||
/* 0x2821 */ DEFINE_SFX(CHAN_1B93, NA_SE_SY_TIMER, 0xA0, 0, 0, SFX_FLAG_13 | SFX_FLAG_3)
|
||||
#if PLATFORM_N64
|
||||
/* 0x2822 */ DEFINE_SFX(CHAN_1BE9, NA_SE_EV_FLAME_IGNITION, 0x2D, 2, 0, 0)
|
||||
#else
|
||||
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
|
||||
/* 0x2822 */ DEFINE_SFX(CHAN_1BE9, NA_SE_EV_FLAME_IGNITION, 0x20, 2, 0, 0)
|
||||
#else
|
||||
/* 0x2822 */ DEFINE_SFX(CHAN_1BE9, NA_SE_EV_FLAME_IGNITION, 0x2D, 2, 0, 0)
|
||||
#endif
|
||||
/* 0x2823 */ DEFINE_SFX(CHAN_1BF9, NA_SE_EV_SPEAR_HIT, 0x30, 0, 0, 0)
|
||||
/* 0x2824 */ DEFINE_SFX(CHAN_1C14, NA_SE_EV_ELEVATOR_MOVE, 0x30, 0, 0, SFX_FLAG_11)
|
||||
|
@ -108,10 +108,10 @@
|
|||
/* 0x285C */ DEFINE_SFX(CHAN_2374, NA_SE_EV_BLOCKSINK, 0x30, 2, 0, 0)
|
||||
/* 0x285D */ DEFINE_SFX(CHAN_2389, NA_SE_EV_CROWD, 0x30, 0, 0, SFX_FLAG_13 | SFX_FLAG_12 | SFX_FLAG_11)
|
||||
/* 0x285E */ DEFINE_SFX(CHAN_23A6, NA_SE_EV_WATER_LEVEL_DOWN, 0x30, 0, 0, 0)
|
||||
#if PLATFORM_N64
|
||||
/* 0x285F */ DEFINE_SFX(CHAN_23D5, NA_SE_EV_NAVY_VANISH, 0x2C, 0, 0, 0)
|
||||
#else
|
||||
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
|
||||
/* 0x285F */ DEFINE_SFX(CHAN_23D5, NA_SE_EV_NAVY_VANISH, 0x30, 0, 0, 0)
|
||||
#else
|
||||
/* 0x285F */ DEFINE_SFX(CHAN_23D5, NA_SE_EV_NAVY_VANISH, 0x2C, 0, 0, 0)
|
||||
#endif
|
||||
/* 0x2860 */ DEFINE_SFX(CHAN_23EB, NA_SE_EV_LADDER_DOUND, 0x30, 3, 0, 0)
|
||||
/* 0x2861 */ DEFINE_SFX(CHAN_2401, NA_SE_EV_WEB_VIBRATION, 0x30, 0, 0, 0)
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
/* 0x1810 */ DEFINE_SFX(CHAN_10A2, NA_SE_IT_BOOMERANG_FLY, 0x30, 0, 0, SFX_FLAG_10)
|
||||
/* 0x1811 */ DEFINE_SFX(CHAN_10D2, NA_SE_IT_SWORD_STRIKE, 0x40, 2, 0, 0)
|
||||
/* 0x1812 */ DEFINE_SFX(CHAN_10E6, NA_SE_IT_HAMMER_SWING, 0x30, 0, 1, 0)
|
||||
#if PLATFORM_N64
|
||||
/* 0x1813 */ DEFINE_SFX(CHAN_10F4, NA_SE_IT_HOOKSHOT_REFLECT, 0x20, 0, 0, 0)
|
||||
#else
|
||||
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
|
||||
/* 0x1813 */ DEFINE_SFX(CHAN_10F4, NA_SE_IT_HOOKSHOT_REFLECT, 0x30, 0, 0, 0)
|
||||
#else
|
||||
/* 0x1813 */ DEFINE_SFX(CHAN_10F4, NA_SE_IT_HOOKSHOT_REFLECT, 0x20, 0, 0, 0)
|
||||
#endif
|
||||
/* 0x1814 */ DEFINE_SFX(CHAN_110B, NA_SE_IT_ARROW_STICK_CRE, 0x30, 0, 0, 0)
|
||||
/* 0x1815 */ DEFINE_SFX(CHAN_1120, NA_SE_IT_ARROW_STICK_OBJ, 0x34, 0, 0, 0)
|
||||
|
|
|
@ -1188,7 +1188,7 @@ u8 D_8016B9F3;
|
|||
u8 sFanfareStartTimer;
|
||||
u16 sFanfareSeqId;
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
u16 sPrevAmbienceSeqId;
|
||||
#endif
|
||||
|
||||
|
@ -1706,7 +1706,7 @@ void AudioOcarina_PlayControllerInput(u8 unused) {
|
|||
} else {
|
||||
// no bending or vibrato for recording state OCARINA_RECORD_SCARECROW_SPAWN
|
||||
sCurOcarinaBendIndex = 0;
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
sCurOcarinaVibrato = 0;
|
||||
#endif
|
||||
sCurOcarinaBendFreq = 1.0f; // No bend
|
||||
|
@ -1852,18 +1852,17 @@ void AudioOcarina_PlaybackSong(void) {
|
|||
sRelativeNotePlaybackVolume = sNotePlaybackVolume / 127.0f;
|
||||
}
|
||||
|
||||
#if PLATFORM_N64
|
||||
// Update vibrato
|
||||
sNotePlaybackVibrato = sPlaybackSong[sPlaybackNotePos].vibrato;
|
||||
// Sets vibrato to io port 6
|
||||
AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, SFX_CHANNEL_OCARINA, 6, sNotePlaybackVibrato);
|
||||
#else
|
||||
// Update vibrato
|
||||
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
|
||||
if (sNotePlaybackVibrato != sPlaybackSong[sPlaybackNotePos].vibrato) {
|
||||
sNotePlaybackVibrato = sPlaybackSong[sPlaybackNotePos].vibrato;
|
||||
// Sets vibrato to io port 6
|
||||
AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, SFX_CHANNEL_OCARINA, 6, sNotePlaybackVibrato);
|
||||
}
|
||||
#else
|
||||
sNotePlaybackVibrato = sPlaybackSong[sPlaybackNotePos].vibrato;
|
||||
// Sets vibrato to io port 6
|
||||
AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, SFX_CHANNEL_OCARINA, 6, sNotePlaybackVibrato);
|
||||
#endif
|
||||
|
||||
// Update bend
|
||||
|
@ -2145,7 +2144,7 @@ void AudioOcarina_RecordSong(void) {
|
|||
} else if (sRecordOcarinaVolume != sCurOcarinaVolume) {
|
||||
noteChanged = true;
|
||||
} else if (sRecordOcarinaVibrato != sCurOcarinaVibrato) {
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
if (sRecordingState != OCARINA_RECORD_SCARECROW_SPAWN) {
|
||||
noteChanged = true;
|
||||
}
|
||||
|
@ -2153,7 +2152,7 @@ void AudioOcarina_RecordSong(void) {
|
|||
noteChanged = true;
|
||||
#endif
|
||||
} else if (sRecordOcarinaBendIndex != sCurOcarinaBendIndex) {
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
if (sRecordingState != OCARINA_RECORD_SCARECROW_SPAWN) {
|
||||
noteChanged = true;
|
||||
}
|
||||
|
@ -2494,7 +2493,7 @@ f32 Audio_ComputeSfxFreqScale(u8 bankId, u8 entryIdx) {
|
|||
|
||||
switch (bankId) {
|
||||
case BANK_VOICE:
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
if (((entry->sfxId & 0xFF) < 0x40) && (sAudioBaseFilter2 != 0)) {
|
||||
phi_v0 = true;
|
||||
} else if (((entry->sfxId & 0xFF) >= 0x40) && (sAudioExtraFilter2 != 0)) {
|
||||
|
@ -2615,7 +2614,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex) {
|
|||
f32 behindScreenZ;
|
||||
u8 baseFilter = 0;
|
||||
SfxBankEntry* entry = &gSfxBanks[bankId][entryIdx];
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
s32 pad;
|
||||
#endif
|
||||
|
||||
|
@ -2656,7 +2655,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex) {
|
|||
}
|
||||
}
|
||||
if (sAudioBaseFilter != 0) {
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
if ((bankId == BANK_PLAYER) || (bankId == BANK_ITEM) ||
|
||||
((bankId == BANK_VOICE) && ((entry->sfxId & 0xFF) < 0x40)))
|
||||
#else
|
||||
|
@ -3240,7 +3239,7 @@ void Audio_PlaySceneSequence(u16 seqId) {
|
|||
AUDIOCMD_GLOBAL_STOP_AUDIOCMDS();
|
||||
}
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_DISABLED) {
|
||||
Audio_StopSequence(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
AUDIOCMD_GLOBAL_STOP_AUDIOCMDS();
|
||||
|
@ -3384,7 +3383,7 @@ void func_800F5B58(void) {
|
|||
if (sPrevMainBgmSeqId == NA_BGM_DISABLED) {
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
} else {
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
if (sPrevMainBgmSeqId == NA_BGM_NATURE_AMBIENCE) {
|
||||
sPrevMainBgmSeqId = sPrevAmbienceSeqId;
|
||||
}
|
||||
|
@ -3520,10 +3519,10 @@ void Audio_SetSequenceMode(u8 seqMode) {
|
|||
volumeFadeInTimer);
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY);
|
||||
|
||||
#if PLATFORM_N64
|
||||
if (seqId > NA_BGM_NATURE_AMBIENCE)
|
||||
#else
|
||||
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
|
||||
if (seqId != NA_BGM_NATURE_AMBIENCE)
|
||||
#else
|
||||
if (seqId > NA_BGM_NATURE_AMBIENCE)
|
||||
#endif
|
||||
{
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_SUB,
|
||||
|
@ -3545,14 +3544,20 @@ void Audio_SetSequenceMode(u8 seqMode) {
|
|||
|
||||
sPrevSeqMode = seqMode + 0x80;
|
||||
} else {
|
||||
#if PLATFORM_N64
|
||||
if (seqMode == SEQ_MODE_ENEMY) {
|
||||
// If both seqMode = sPrevSeqMode = SEQ_MODE_ENEMY
|
||||
if ((Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) == NA_BGM_DISABLED) && (seqId != NA_BGM_DISABLED) &&
|
||||
(sSeqFlags[seqId & 0xFF & 0xFF] & SEQ_FLAG_ENEMY)) {
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY);
|
||||
sPrevSeqMode = seqMode + 0x80;
|
||||
}
|
||||
#if OOT_VERSION < NTSC_1_1 || PLATFORM_GC
|
||||
// Empty
|
||||
#elif OOT_VERSION < PAL_1_0
|
||||
if ((seqMode == SEQ_MODE_ENEMY) && (seqId != NA_BGM_FIELD_LOGIC) &&
|
||||
(Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) == NA_BGM_DISABLED)) {
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY);
|
||||
sPrevSeqMode = seqMode + 0x80;
|
||||
}
|
||||
#else
|
||||
// If both seqMode = sPrevSeqMode = SEQ_MODE_ENEMY
|
||||
if ((seqMode == SEQ_MODE_ENEMY) && (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) == NA_BGM_DISABLED) &&
|
||||
(seqId != NA_BGM_DISABLED) && (sSeqFlags[seqId & 0xFF & 0xFF] & SEQ_FLAG_ENEMY)) {
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY);
|
||||
sPrevSeqMode = seqMode + 0x80;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -3595,20 +3600,20 @@ void Audio_SetBgmEnemyVolume(f32 dist) {
|
|||
sAudioEnemyVol = ((350.0f - adjDist) * 127.0f) / 350.0f;
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, VOL_SCALE_INDEX_BGM_SUB, sAudioEnemyVol, 10);
|
||||
|
||||
#if PLATFORM_N64
|
||||
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE)
|
||||
#else
|
||||
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
|
||||
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE)
|
||||
#else
|
||||
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE)
|
||||
#endif
|
||||
{
|
||||
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_SUB, (0x7F - sAudioEnemyVol), 10);
|
||||
}
|
||||
}
|
||||
|
||||
#if PLATFORM_N64
|
||||
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE)
|
||||
#else
|
||||
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
|
||||
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE)
|
||||
#else
|
||||
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE)
|
||||
#endif
|
||||
{
|
||||
Audio_SplitBgmChannels(sAudioEnemyVol);
|
||||
|
@ -3923,7 +3928,7 @@ void func_800F6C34(void) {
|
|||
sFanfareStartTimer = 0;
|
||||
D_8016B9F3 = 1;
|
||||
sMalonSingingDisabled = false;
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
sPrevAmbienceSeqId = NA_BGM_DISABLED;
|
||||
#endif
|
||||
}
|
||||
|
@ -3984,7 +3989,7 @@ void Audio_StartNatureAmbienceSequence(u16 playerIO, u16 channelMask) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
if ((Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_DISABLED) &&
|
||||
(Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_NATURE_AMBIENCE)) {
|
||||
Audio_StopSequence(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
|
@ -4018,7 +4023,7 @@ void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId) {
|
|||
if ((gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId == NA_BGM_DISABLED) ||
|
||||
!(sSeqFlags[gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId & 0xFF & 0xFF] & SEQ_FLAG_NO_AMBIENCE)) {
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) {
|
||||
sPrevAmbienceSeqId = gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId;
|
||||
}
|
||||
|
|
|
@ -437,7 +437,7 @@ void AudioSeq_SequencePlayerDisableAsFinished(SequencePlayer* seqPlayer) {
|
|||
void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer) {
|
||||
s32 finished = 0;
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
if (seqPlayer->finished == 1) {
|
||||
finished = 1;
|
||||
}
|
||||
|
@ -457,7 +457,7 @@ void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer) {
|
|||
}
|
||||
|
||||
if (AudioLoad_IsFontLoadComplete(seqPlayer->defaultFont)) {
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
if (finished == 1) {
|
||||
AudioHeap_ReleaseNotesForFont(seqPlayer->defaultFont);
|
||||
}
|
||||
|
|
|
@ -644,10 +644,10 @@ Acmd* AudioSynth_DoOneAudioUpdate(s16* aiBuf, s32 aiBufLen, Acmd* cmd, s32 updat
|
|||
|
||||
// Leak reverb between the left and right channels
|
||||
|
||||
#if PLATFORM_N64
|
||||
if (((reverb->leakRtl != 0) || (reverb->leakLtr != 0)) && (gAudioCtx.soundMode != SOUNDMODE_MONO))
|
||||
#else
|
||||
#if OOT_VERSION < NTSC_1_1 || PLATFORM_GC
|
||||
if ((reverb->leakRtl != 0) || (reverb->leakLtr != 0))
|
||||
#else
|
||||
if (((reverb->leakRtl != 0) || (reverb->leakLtr != 0)) && (gAudioCtx.soundMode != SOUNDMODE_MONO))
|
||||
#endif
|
||||
{
|
||||
cmd = AudioSynth_LeakReverb(cmd, reverb);
|
||||
|
@ -785,7 +785,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
|
|||
samplesLenFixedPoint = (resamplingRateFixedPoint * aiBufLen * 2) + synthState->samplePosFrac;
|
||||
numSamplesToLoad = samplesLenFixedPoint >> 16;
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC)
|
||||
if (numSamplesToLoad == 0) {
|
||||
skipBytes = false;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "versions.h"
|
||||
|
||||
#define SAMPLES_TO_OVERPRODUCE 0x10
|
||||
#define EXTRA_BUFFERED_AI_SAMPLES_TARGET 0x80
|
||||
|
@ -16,7 +17,7 @@ AudioTask* AudioThread_Update(void) {
|
|||
return AudioThread_UpdateImpl();
|
||||
}
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !(OOT_VERSION < PAL_1_0 || PLATFORM_GC)
|
||||
static s32 sMaxAbiCmdCnt = 0x80;
|
||||
static AudioTask* sWaitingAudioTask = NULL;
|
||||
#endif
|
||||
|
@ -25,7 +26,7 @@ static AudioTask* sWaitingAudioTask = NULL;
|
|||
* This is Audio_Update for the audio thread
|
||||
*/
|
||||
AudioTask* AudioThread_UpdateImpl(void) {
|
||||
#if !PLATFORM_N64
|
||||
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
|
||||
static s32 sMaxAbiCmdCnt = 0x80;
|
||||
static AudioTask* sWaitingAudioTask = NULL;
|
||||
#endif
|
||||
|
|
|
@ -18,10 +18,10 @@ const TempoData gTempoData = {
|
|||
// Sizes of everything on the init pool
|
||||
#define AI_BUFFERS_SIZE (AIBUF_SIZE * ARRAY_COUNT(gAudioCtx.aiBuffers))
|
||||
#define SOUNDFONT_LIST_SIZE (NUM_SOUNDFONTS * sizeof(SoundFont))
|
||||
#if PLATFORM_N64
|
||||
#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONT_1_SIZE + SFX_SOUNDFONT_2_SIZE + 0x10)
|
||||
#else
|
||||
#if OOT_VERSION < PAL_1_0 || PLATFORM_GC
|
||||
#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONT_1_SIZE + SFX_SOUNDFONT_2_SIZE)
|
||||
#else
|
||||
#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONT_1_SIZE + SFX_SOUNDFONT_2_SIZE + 0x10)
|
||||
#endif
|
||||
|
||||
const AudioHeapInitSizes gAudioHeapInitSizes = {
|
||||
|
|
|
@ -342,7 +342,7 @@ void Audio_ChooseActiveSfx(u8 bankId) {
|
|||
entry->sfxId, entry->posX, entry->posZ, *entry->posX, *entry->posY, *entry->posZ);
|
||||
}
|
||||
entry->priority = (u32)entry->dist + (SQ(0xFF - sfxImportance) * SQ(76));
|
||||
#if !PLATFORM_N64
|
||||
#if OOT_VERSION < NTSC_1_1 || PLATFORM_GC
|
||||
temp3 = entry->sfxId; // fake
|
||||
entry->priority = entry->priority + temp3 - temp3;
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
#include "versions.h"
|
||||
|
||||
#define DEFINE_SFX(_0, _1, importance, distParam, randParam, flags) \
|
||||
{ importance, ((((distParam) << SFX_PARAM_01_SHIFT) & SFX_PARAM_01_MASK) | \
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "attributes.h"
|
||||
#include "z64audio.h"
|
||||
#include "versions.h"
|
||||
|
||||
// Symbol definition
|
||||
|
||||
|
|
Loading…
Reference in a new issue