The GCU and X11 front ends aren't using sound.cfg; I didn't check the other front ends. They use the name associated with the sound ("hit" for instance) with ".wav" appended as the name of the file to load. Modifying the source code - probably something shared that each front end can call to do the initialization (parsing of sound.cfg) and to query for the sound file to play on a specific event - is the cleanest solution.
An alternative would be to hack it so for instance, hit.wav, is a placeholder (either a symbolic link to one of other "hit" sound files or a copy) and the script to play the sound randomly swaps in one of the other files (by changing the link or copying over) based on what's in sound.cfg before playing the sound. That would avoid having to change the .c files. It wouldn't work well in a multi-user environment (more than one game running using the same shared game configuration directory) without extra care taken when doing the file swaps.
An alternative would be to hack it so for instance, hit.wav, is a placeholder (either a symbolic link to one of other "hit" sound files or a copy) and the script to play the sound randomly swaps in one of the other files (by changing the link or copying over) based on what's in sound.cfg before playing the sound. That would avoid having to change the .c files. It wouldn't work well in a multi-user environment (more than one game running using the same shared game configuration directory) without extra care taken when doing the file swaps.
Comment