Sorry to be blunt, but Ive suffered with IBS and the inevitable farting that goes with it for years. I an currently having a go with the FODMAP diet which I believe will help me, but the wind is always there, regardless of diet.
So I have started taking digestive enzymes (the brand I take is Doctors Best Digestive Enzymes) ,and the results have been really positive, reducing my wind by a good 80-90%. And anyone with diarrea will tell you, that is a definite help. They are pricey, but worth every penny, as they help the gut digest the food our weakened stomach cannot.