I regularly (weekly+) use electronic ear muffs while shooting (Walker brand ~$50 US). I believe the ones I use are -29 or -32db, don't remember exactly. During weekly competitions, standing within a few feet of pistol muzzles or nearby large bore rifles, etc., they work great. The concussion wave hitting you in the gut from those large bores is far more uncomfortable!
They're basically a normal pair of headphone type 'muffs' with speakers inside and microphones on the outside. When a loud sound is detected the electronics will instantly cut the volume until the sound has reduced. Closing a car door is enough to do it.
The best part of this type is the ability to hold a normal conversation in between rounds without having to take them off or move them aside to understand what was said and getting caught unprotected.
Typically they also have the ability to amplify normal sounds many times for hunting. A soft whisper from across the room can be clearly understood as well as a deer (or insert favorite prey) heard rustling far off in the distance. You can also communicate quietly with your hunting partner. They're quite effective.
Best to get the kind that have stereo microphones and maintain locational information. The mono kind sounds like you're in a hallway or in a tube. When wielding some rifles they do tend to get in the way and in that case I will use an ear plug type of protection then switch back afterwards, in between rounds, so I can talk to my friends and competitors about how great my last round was.
TJ