View Single Post
Old March 25, 2016, 04:23   #10
Join Date: Mar 2016
Posts: 194
calris is on a distinguished road
Ironed out all the bugs and tidied up the code

The latest version of the new sound sub-system is here:

Looking forward to a in-depth review of this. A few 'nice' features:
- I'm using an AVL (balanced binary) tree to store sound and mapping information so there should be a lot less memory used by the sound sub system (EDIT: The old system loaded sounds multiple times - once for EVERY instance in the sound config)
- sounds are now defined in a .prf file chainloaded by pref.prf so now it's trivial to re-assign sounds (and even have sounds assigned per-class and per-character) in user preference files
- file extensions are not used in the sound.prf file - it is up to the platforms sound module to search add supported extensions
- SDL handles mp3 and ogg now. Adding new extensions is trivial (see supported_file_types[] in snd_sdl.c)
- Did I mention balanced trees? I'm sure there are lots of other places we can use them
- The only thing main.c now know about sound is to call init_sound()
calris is offline   Reply With Quote