Apparatus in which combustion takes place in pulses influenced by acoustic resonance in a gas mass