Acoustic resonances and sound scattering by a shear layer