Refactor audio system and optimize build configuration
- Rename Source to AudioSrc and refactor sound processing logic.
- Spatial SFX go into Sfx3d, and interface SFX go into SfxUi.
- Add loot pickup sound effect and increase gain for various SFX.
- Update Makefile to buld release by default and set up .dir-locals.el for release.
- Return the intermediate texture to full screen resolution, update the blurring values accordingly.
- Centralize in game SFX processing in SfxSrc.
- Integrate new audio assets for clicks and loot pickup including click sounds for PieMenu and button interactions.
I found a magic phrase, #pragma clang optimize on, which supposedly forces optimization for a specific part of the code. I’m not sure if it goes all the way to -O3, but it was enough to let my sound subsystem handle up to 256 concurrent sounds without choking—even in a debug build.
Well, #pragma clang optimize on turned out not to work as well as I hoped. I’ve decided to just run the game in release mode by default and only switch to debug when I actually need to step through the code.