Hydromagnetic wave propagation in inhomogeneous magnetic fields