cppcheck performance fixes in cores/AudioEngine