diff --git a/src/audio/external.c b/src/audio/external.c index bd1494fd..33e7f98c 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -324,17 +324,6 @@ u8 sSoundBankFreeListFront[SOUND_BANK_COUNT] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; u8 sNumSoundsInBank[SOUND_BANK_COUNT] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // only used for debugging u8 sMaxChannelsForSoundBank[SOUND_BANK_COUNT] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; -// Banks 2 and 7 both grew from 0x30 sounds to 0x40 in size in US. -#ifdef VERSION_JP -#define BANK27_SIZE 0x30 -#else -#define BANK27_SIZE 0x40 -#endif -u8 sNumSoundsPerBank[SOUND_BANK_COUNT] = { - 0x70, 0x30, BANK27_SIZE, 0x80, 0x20, 0x80, 0x20, BANK27_SIZE, 0x80, 0x80, -}; -#undef BANK27_SIZE - // sBackgroundMusicMaxTargetVolume and sBackgroundMusicTargetVolume use the 0x80 // bit to indicate that they are set, and the rest of the bits for the actual value #define TARGET_VOLUME_IS_PRESENT_FLAG 0x80 @@ -814,17 +803,15 @@ void play_sound(s32 soundBits, f32 *pos) { * Called from threads: thread4_sound, thread5_game_loop (EU only) */ static void process_sound_request(u32 bits, f32 *pos) { - u8 bank; - u8 soundIndex; - u8 counter = 0; - u8 soundId; + s32 bank; + s32 soundIndex; + s32 counter = 0; f32 dist; const f32 one = 1.0f; bank = (bits & SOUNDARGS_MASK_BANK) >> SOUNDARGS_SHIFT_BANK; - soundId = (bits & SOUNDARGS_MASK_SOUNDID) >> SOUNDARGS_SHIFT_SOUNDID; - if (soundId >= sNumSoundsPerBank[bank] || sSoundBankDisabled[bank]) { + if (sSoundBankDisabled[bank]) { return; }