The classical theory of scattering of longitudinal waves (sound) by small inhomogeneities (scatterers) in an ideal fluid is generalized to a distribution of scatterers and such as to include the effect of the inhomogeneities on the elastic properties of the fluid. The results are obtained by a new method of solving the wave equation with spatial restrictions (caused by the presence of the scatterers), which can also be applied to other types of inhomogeneities (like surface roughness, for instance). A coherent forward scattering is identified for a uniform distribution of scatterers (practically equivalent with a mean-field approach), which is due to the fact that our treatment does not include multiple scattering. The reflected wave is obtained for a half-space (semi-infinite fluid) of uniformly distributed scatterers, as well as the field diffracted by a perfect lattice of scatterers. The same method is applied to a (inhomogeneous) rough surface of a semi-infinite ideal fluid. A perturbation-theoretical scheme is devised, with the roughness function as a perturbation parameter, for computing the waves scattered by the surface roughness. The waves scattered by the rough surface are both waves localized (and propagating only) on the surface (two-dimensional waves) and waves reflected back in the fluid. They exhibit directional effects, slowness, attenuation or resonance phenomena, depending on the spatial characteristics of the roughness function. The reflection coefficients and the energy carried on by these waves are calculated both for fixed and free surfaces. In some cases, the surface roughness may generate waves confined to the surface (damped, rough-surface waves).