Add safeguard for beat pattern wheelevent
Fix #963
Merge pull request #988 from diizy/stable-1.1

Add safeguard for beat pattern wheelevent
InstrumentSoundShaping: ensure that release time is never longer than the volume envelope, if volume envelope is active
This saves CPU on certain instruments, like Monstro.
There's no point in running the note beyond the end of the volume envelope, ever, so let's not do that.
Merge pull request #990 from diizy/stable-1.1

InstrumentSoundShaping: ensure that release time is never longer than th...
Mixer: optimize peak value measuring functions
Merge pull request #991 from diizy/stable-1.1

Mixer: optimize peak value measuring functions
Merge pull request #992 from LMMS/stable-1.1

sync