Logic precedence error, warning fixes
Avoid division by zero in audio envelope processing. Fixes sound FX on android in some games.