Sanitize master output
Replace any inf/nan in master output with zero, to prevent corrupted files/audio.
Merge pull request #986 from diizy/stable-1.1

Sanitize master output