Refactoring of audioEngine_process_checkBPMChanged