Amplitude and phase modulation of cavity modes in a supersonic flow