Does a change in the medium through which a wave is travelling change its frequency?