Active control of flow-induced cavity resonance