A numerical approach based on high-order stabilized finite elements is proposed to solve thermo-acoustic and visco-acoustic problems accounting for non-uniform mean flow effects. The approach is based on the Linearized Navier-Stokes equations written in conservative form in the frequency domain. An adaptive polynomial Finite-Element Method (FEM) using hierarchic shape functions is applied for accuracy and ease-of-use. A new enrichment strategy, inspired by the extended Finite Element Method (X-FEM), is developed to resolve the finer scales near the walls at a reasonable computational cost. It relies on a re-orthogonalization procedure proposed to preserve both the continuity of the solution and the conditioning properties of the discrete model. The performance of the method is first evaluated by performing two-dimensional simulations of acoustic waves affected by visco-thermal wall losses and mean flow effects while propagating in a duct. Numerical results are in good agreement with the analytical solution. The applicability of this new methodology is then demonstrated by computing the sound absorption of an acoustic liner installed in an impedance tube in the presence of a grazing flow in 2D. Numerical predictions of the sound pressure levels in the tube are compared to experimental data from the literature.