jonls/freeserf — pull request #31 by jonls (2012-11-21 11:58:16+00:00)
Title: audio: Improve performance and add error checks.

audio: Don't use slow insertion sort for sound list, just prepend instead.
audio: Add error check after mallocs.
audio: Simplify midi node comparison function.

I can see that for correct midi production the midi nodes need to be sorted by time, but I couldn't find any reason for keeping the sfx cache list sorted. @wdigger any reason for this?
It might be good to use a better data structure for this in the future but for now it is not that important since the midi production is only done once when the track is started, and there are not that many sounds.