The present invention is directed to a system, method, and computer program product for controlling the supply of a distending media (such as an insufflating gas) from a distending media source to an endoscopic device so as to prevent the excess venting and/or waste of distending media. More specifically the present invention provides for the detection of a pressure level within a lumen of an endoscopic device and adjusts a supply parameter of the distending media based at least in part on the detected pressure level, and in some cases on the relationship between the detected pressure level and a user-defined threshold.