fix(gameaudio): Remove the has3DSensitiveStreamsPlaying volume hack - #3252
fix(gameaudio): Remove the has3DSensitiveStreamsPlaying volume hack#3252xezon wants to merge 2 commits into
Conversation
PR Summary by QodoRemove 3D stream volume workaround and avoid redundant updates
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1. Alt-tab recovery no longer works
|
|
| Filename | Overview |
|---|---|
| Core/GameEngine/Include/Common/GameAudio.h | Removes the stream-sensitivity query from the device-independent audio interface. |
| Core/GameEngine/Source/Common/Audio/GameAudio.cpp | Recomputes category and 3D-adjusted volumes and marks them dirty only when the effective value changes. |
| Core/GameEngineDevice/Include/MilesAudioDevice/MilesAudioManager.h | Removes the obsolete stream-sensitivity overrides from the Miles and dummy managers. |
| Core/GameEngineDevice/Source/MilesAudioDevice/MilesAudioManager.cpp | Deletes the Miles-specific sensitive-stream detection workaround. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Camera[Camera or microphone movement] --> Zoom[Compute zoom volume]
Zoom --> Adjust[set3DVolumeAdjustment]
Adjust --> Changed{Effective volume changed?}
Changed -- No --> Skip[Keep dirty flag unchanged]
Changed -- Yes --> Dirty[Set m_volumeHasChanged]
Dirty --> Process[processPlayingList]
Process --> Apply[Apply volume to active samples and streams]
Reviews (1): Last reviewed commit: "tweak(gameaudio): Only update sound volu..." | Re-trigger Greptile
Merge with Rebase
This change has 2 commits.
The first is removing the has3DSensitiveStreamsPlaying hack. It existed to workaround a hang on volume change. We aim to fix application hanging and not rely on the hack from here on.
The second is committing to sound volume change only if the volume has really changed, not merely calling the volume change function. This may or may not avoid unnecessary sound volume updates.
TODO