The Purcell effect for an emitter near the interface of two media and its application to optomechanical problems are considered. A mesoscopic model of a discrete-continuous medium is developed, it is shown that taking into account the discreteness of the medium near the emitter leads to a significant correction of the spontaneous decay rate. The Purcell effect for a moving emitter is considered and the possibility of extracting information about the motion of the emitter from the radiation spectrum is shown.