modify sync_getsample_safesync