Doppler effect in medium