Your beagle acts like it is choking!!  It is standing with head down, neck extended, front legs spread wide and making horrible air sucking sounds.  His ribs are sticking out and his stomach sucked in....he can't stop.!!  Many owners rush their beagle to the vet thinking they have choked on something.  When arriving at the vets your beagle jumps out of car without any signs of the previous respiratory distress....

Probably he was doing the famous beagle snort-or more properly known as a reverse sneeze.  It is not harmful to them.  Here are a couple of  videos of  a reverse sneezing.

The exact cause of reverse sneezing is unknown, but it may be associated with sinusitis, allergies and other upper respiratory disorders.
Many believe affected dogs are consciously removing mucus from the nasal passages.  You can help you beagle stop by placing you hand over his nose or rubbing his throat.  Getting him to swallow or take a deep breath will help him to stop making that horrible gasping noise.  But remember reverse sneezing is not harmful and a common occurrence in beagles.