In Kinsler's "Fundamentals of Acoustics", on pp. 119-120, it claims, quote, "Since the above derivation never required a restriction on B or rho0 with respect to space, (5.5.4) (which is the same as equation (7)) is valid for propagation in media with sound speeds that are functions of space...