The hydrodynamic equations of superfluid He4 in a superleak are used to obtain an exact and general expression for the velocity of fourth sound in the presence of a steady superfluid flow. This expression, which depends only on the flow velocity and on static properties of the helium-superleak system, may be simplified when effects due to the finite-pore dimensions are negligible. In that case the fourth-sound velocity may be rewritten in terms of the flow velocity, thermodynamic properties of bulk helium and bulk filler material, and some purely geometric parameters. The expression obtained disagrees with the results of a previous calculation. A relation between the fourth-sound velocity at zero flow and the Doppler shift at finite flow, predicted by the present theory, is in conflict with existing experimental data. Possible explanations for this discrepancy are discussed.