Involved in the biosynthesis of virginiae butanolide (VB), a gamma-butyrolactone autoregulator that triggers the production of the streptogramin antibiotic virginiamycin. a medium-chain 3-oxoacyl-[ACP] + dihydroxyacetone phosphate = a 2-oxo-3-(phosphooxy)propyl medium-chain 3-oxoalkanoate + holo-[ACP] Null mutant is unable to produce virginiamycin. Addition of VB restores the deficiency of virginiamycin production. Belongs to the AfsA family. It was originally suggested that BarX is likely to participate in the regulatory pathway for the production of VB, rather than in the biosynthetic pathway of VB itself.