This is just unrolls the inner loop on genering the mixbuff values, and only
calculates loop invariants once.
It doesn't seem like much, but this was the biggest hotspot on a CPU profile
for the entire game!
More importantly: when run on a Raspberry Pi Zero, the music went from
unusable to perfect, as it can now keep up with the audio callback, which is
nice for using SDLPoP on some sort of mini RetroPie thing.
This is just unrolls the inner loop on genering the mixbuff values, and only calculates loop invariants once.
It doesn't seem like much, but this was the biggest hotspot on a CPU profile for the entire game!
More importantly: when run on a Raspberry Pi Zero, the music went from unusable to perfect, as it can now keep up with the audio callback, which is nice for using SDLPoP on some sort of mini RetroPie thing.