This paper presents a lattice Boltzmann (LB) method based study aimed at numerical simulation of aeroacoustic phenomenon in flows around a symmetric obstacle. To simulate the compressible flow accurately, a potential energy double-distribution-function (DDF) lattice Boltzmann method is used over the entire computational domain from the near to far fields. The buffer zone and absorbing boundary condition is employed to eliminate the non-physical reflecting. Through the direct numerical simulation, the flow around a circular cylinder at Re=150, M=0.2 and the flow around a NACA0012 airfoil at Re=10000, M=0.8, α=0° are investigated. The generation and propagation of the sound produced by the vortex shedding are reappeared clearly. The obtained results increase our understanding of the characteristic features of the aeroacoustic sound.