The driver of a BMW involved in a fatal crash had been drinking at a wake earlier on the day, a court has heard