cppcheck performance fixes in cores/AudioEngine
Merge pull request #5997 from tobbi/cppcheck_perf_cores_audioengine