When returning from being minimized, ArmA replays the last gunshot at max volume (which hurts quite a bit).
The ghost gunshots will continue to happen every time you maximize arma, unless you fire a shot in a building. Seems to be tied to the echo effect. Firing full auto and then minimizing results in multiple ghost gunshots at the same time.
Sometimes it happens after being paused in the editor for a little.