From deabd6844bd08c37a839d5c11fd07b6f677ac990 Mon Sep 17 00:00:00 2001 From: Demur Rumed Date: Fri, 30 May 2025 23:39:20 +0000 Subject: [PATCH] reduce to 8 slots --- .../accessible-actors/AccessibleAudioEngine.h | 2 +- .../Enhancements/accessible-actors/ActorAccessibility.cpp | 8 ++++---- .../Enhancements/accessible-actors/ActorAccessibility.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/soh/soh/Enhancements/accessible-actors/AccessibleAudioEngine.h b/soh/soh/Enhancements/accessible-actors/AccessibleAudioEngine.h index 16f6826b4..48fd2cbe0 100644 --- a/soh/soh/Enhancements/accessible-actors/AccessibleAudioEngine.h +++ b/soh/soh/Enhancements/accessible-actors/AccessibleAudioEngine.h @@ -11,7 +11,7 @@ #include "soh/Enhancements/audio/miniaudio.h" #define AAE_SOUND_ACTION_BATCH_SIZE 64 -#define AAE_SLOTS_PER_HANDLE 16 +#define AAE_SLOTS_PER_HANDLE 8 class IResource; struct DecodedSample { void* data; // A wav file. diff --git a/soh/soh/Enhancements/accessible-actors/ActorAccessibility.cpp b/soh/soh/Enhancements/accessible-actors/ActorAccessibility.cpp index 8f5fe5378..78ce42842 100644 --- a/soh/soh/Enhancements/accessible-actors/ActorAccessibility.cpp +++ b/soh/soh/Enhancements/accessible-actors/ActorAccessibility.cpp @@ -383,15 +383,15 @@ void ActorAccessibility_RunAccessibilityForActor(PlayState* play, AccessibleActo if (player->stateFlags1 & PLAYER_STATE1_FIRST_PERSON && (player->stateFlags1 & PLAYER_STATE1_USING_BOOMERANG || player->stateFlags1 & PLAYER_STATE1_ITEM_IN_HAND)) { auto aimAssistProps = ActorAccessibility_ProvideAimAssistForActor(actor); - ActorAccessibility_SetSoundPitch(actor, 9, aimAssistProps.pitch); - ActorAccessibility_SetSoundVolume(actor, 9, aimAssistProps.volume); - ActorAccessibility_SetSoundPan(actor, 9, aimAssistProps.pan); + ActorAccessibility_SetSoundPitch(actor, 7, aimAssistProps.pitch); + ActorAccessibility_SetSoundVolume(actor, 7, aimAssistProps.volume); + ActorAccessibility_SetSoundPan(actor, 7, aimAssistProps.pan); // The above will have taken care of setting the appropriate frequency and pitch, so we'll take care of the // audio here based on those results. if (++actor->aimAssist.framesSinceAimAssist >= actor->aimAssist.frequency) { actor->aimAssist.framesSinceAimAssist = 0; - ActorAccessibility_PlaySoundForActor(actor, 9, actor->policy.aimAssist.sfx, false); + ActorAccessibility_PlaySoundForActor(actor, 7, actor->policy.aimAssist.sfx, false); } } else { // Make sure there's no delay the next time you draw your bow or whatever. diff --git a/soh/soh/Enhancements/accessible-actors/ActorAccessibility.h b/soh/soh/Enhancements/accessible-actors/ActorAccessibility.h index 204f9ea90..4b34b6cea 100644 --- a/soh/soh/Enhancements/accessible-actors/ActorAccessibility.h +++ b/soh/soh/Enhancements/accessible-actors/ActorAccessibility.h @@ -65,7 +65,7 @@ struct AccessibleActor { f32 currentPitch; s16 sceneIndex; // If this actor represents a scene transition, then this will contain the destination scene index. // Zero otherwise. - u16 managedSoundSlots; // These have their attenuation and panning parameters updated every frame automatically. + u8 managedSoundSlots; // These have their attenuation and panning parameters updated every frame automatically. struct { u16 framesSinceAimAssist; // Allows rate-based vertical aim assist. Incremented every frame for aim assist // actors. Manually reset by aim assist provider.