before the dwelling-place, &c.--that is, in the tent which David had erected for receiving the ark after it was removed from the house of Obed-edom [Sa2 6:17]. This was a considerable time before the temple was built.
they waited on their office according to their order--which David, doubtless by the direction of the Holy Spirit, had instituted for the better regulation of divine worship.