Audio¶
Two-stage plan: today's level-placed BGM/SFX conductor is enough for the demo. The full FMOD path is queued for Gate 3.
AAudioManager (today)¶
A level-placed actor that runs background music and exposes volume controls. Drop one in each level.
Components:
BGMComponent(UAudioComponent) — the actual playback handle.
Auth fields:
BGMTracks(TArray<USoundBase*>) — the playlist for this level.StartingTrackIndex(default 0) —-1means "don't auto-play".bAutoPlayBGM(default true),bLoopBGM(default true).BGMVolume(default 0.5, clamp 0–1).SFXVolume(default 1.0, clamp 0–1) — applies to all 2D sounds globally via the sound class.
API:
PlayBGM(TrackIndex),StopBGM,PauseBGM,ResumeBGM.SetBGMVolume(float)/GetBGMVolume.SetSFXVolume(float)/GetSFXVolume.IsBGMPlaying,GetCurrentTrackIndex.PlayNextTrack/PlayPreviousTrack— wrap-around playlist navigation.CrossfadeToTrack(TrackIndex, FadeDuration = 1.0)— driven byUpdateCrossfadeticking onCrossfadeTimerHandle.
State (private):
CurrentTrackIndex,bIsPaused.- Crossfade state:
CrossfadeTargetTrack,CrossfadeProgress,CrossfadeDuration. OnBGMFinished— wired to the audio component's finish delegate; ifbLoopBGM, restarts the same track; otherwise advances to the next.
Per-rune SFX¶
URuneDataAsset carries optional PickupSound, PlaceSound, SplitSound, ActivationSound. The slot and carry component fall back to defaults when these are null:
URuneCarryComponent::DefaultPickupSound/DefaultDropSound— used when the carried rune's data asset has no override.ARuneSlot::DefaultSlotPlacementSound— used when the placed rune has noPlaceSound.
Designer rule: only override the per-rune sound if the rune is special. Silence on a data asset means "use the default."
FMOD path (planned)¶
The Audio Engineer will introduce the FMOD plugin (FMODStudio) and migrate triggers from UGameplayStatics::PlaySound2D / UAudioComponent to FMOD events. The migration shape:
- Add
FMODStudiotoRephrased_Demo.uprojectplugins. - Add the project's FMOD bank to
Content/FMOD/. - Replace per-rune
USoundBase*fields onURuneDataAssetwithUFMODEvent*references (or keep both, gated by a project setting, during the transition). - Replace
AAudioManagerwith FMOD parameter routing — BGM becomes a single FMOD event with state parameters. - Hook FMOD parameters to game state (e.g. tension parameter rises during a sentence activation).
Until that lands, all new audio integrations target AAudioManager and per-data-asset sound fields.
Source files¶
Source/Rephrased_Demo/AudioManager.hSource/Rephrased_Demo/RuneDataAsset.h(per-rune audio fields)Source/Rephrased_Demo/RuneCarryComponent.h(carry defaults)Source/Rephrased_Demo/RuneSlot.h(slot defaults)
Known constraints¶
SFXVolumeonAAudioManagersets a global multiplier but the implementation depends on the sound class hierarchy (a designer-side setup). New sounds that aren't routed through the master sound class won't respond.CrossfadeToTrackruns on a timer that advancesCrossfadeProgresslinearly. No curve. Acceptable for the demo, but will be replaced by FMOD parameter automation.- No spatial audio configuration today — every sound is 2D. FMOD migration will introduce spatializer profiles for ambient and proximity-aware events.
Change history¶
- 2026-05-08 — Gabriel Li — Added baseline change history section for weekly wiki maintenance.