15  Sound Mixer Data Structures

This walkthrough covers the core data structures and tables that power DOOM’s sound mixer system: sfxinfo_t and musicinfo_t structs, their enums, and the arrays S_sfx[] and S_music[].


15.1 🔧 sfxinfo_t in sounds.h

This struct holds metadata and runtime state for each sound effect.

```c typedef struct { char name[8]; // WAD lump name (max 6 chars) int singularity; // Only one instance at a time? int priority; // Priority for playback channel eviction sfxinfo_t link; // Optional aliasing to another sound int pitch; // Pitch override for linked sound int volume; // Volume override void data; // Raw cached sound data int usefulness; // Cache eviction counter int lumpnum; // WAD lump index } sfxinfo_t;