Fixes to audio attenuation jumps and better sample loop script

Something seems really fishy about this change you've made here... It appears as if a lot of this code used to be in an if (shouldAttenuate) section, and now you moved it into ALWAYS getting executed. Maybe I'm just misreading the diff... but are you sure this is what you wanted to do?

At the very list, this ++_sumMixes is wrong... because you're incrementing your mix count when a couple lines later you may decide not to mix it at all.