Interferometry is used for measuring line average electronic densities in fusion plasmas. The W7-X stellarator will employ a two-color CO2 (10.591 m) and CO (5.295 m) heterodyne-infrared interferometer as an electronic density measurement diagnostic. The frequency displacement is 40 MHz for the CO2 wavelength and 25 MHz for the CO, so these values will fix the heterodyne frequencies. Because the frequency gap between the two carriers is wide enough and the detector sensitivity is similar for both wavelengths, it is possible to use a single detector for the two signals; nevertheless, they should be split with filters. Traditionally, the intermediate-frequency signals should be filtered, downconverted to a lower frequency by the use of analog circuitry, and then processed. A new approach is proposed. The intermediate-frequency signals are directly sampled by means of high-speed analog-to-digital converters followed by a digital diplexer and a specific phase-meter processor implemented in a field-programmable gate array. Preliminary results from the W7-X infrared interferometer prototype, without plasma, are presented.