In the aeroacoustic measurements of a windtunnel test, the acoustic resonance should be avoided, associated with the walled test section. The present numerical study of an NACA0012 airfoil focuses on how the wall resonance affects unsteady flow motions via a feedback process, by comparing with the airfoil placed in a free stream. Tonal frequencies observed in the present simulations agree well with our previous wind-tunnel experiments, represented approximately by the discrete resonant modes derived through a simple geometrical relation. More importantly, however, the present results indicate that rather strong wall resonance may alter the hydrodynamic flow measurements as well. The acoustic feedback process stimulates the transitional boundary layer on the suction side, which would increase lift force in the acoustically resonant channel by suppressing trailing-edge separation. At a higher angle of attack, the increment of lift force becomes more significant due to the noticeable size reduction of a separation bubble, understood via the comparison of three-dimensional instantaneous vortical structures.