fixed racecondition with EngineControl::getCurrentSample()