reduce to 8 slots

This commit is contained in:
Demur Rumed 2025-05-30 23:39:20 +00:00
commit deabd6844b
3 changed files with 6 additions and 6 deletions

View file

@ -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.

View file

@ -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.

View file

@ -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.