An ambulance has a siren that emits sound of a constant frequency. The ambulance is moving directly towards a stationary observer. The ambulance decelerates as it is approaching the observer and then accelerates after it has passed the observer. How does the frequency of the sound heard by the observer change as the ambulance is approaching and as it is moving away from the observer?