"I accidentally my ar15 (ddm4v7) in a building, will i potentially lose my hearing after this?"
Firing an AR15 or other rifle caliber firearm in a building with no ear pro will momentarily deafen you and be extremely unpleasant and disorienting unless you are pretty desensitized to it, especially if the gun has a loud muzzle device like a brake.
This will definitely cause hearing damage, but it will take prolonged exposure to become noticeable, ask anyone in the military what happens from exposure to gunfire.
Suppressors (illegal in CA, federal offense w/o paperwork as well) mitigate this but do not make a 5.56 gun "hearing safe" rather they take the experience of shooting without ear pro from distractedly painful to unpleasant but manageable.
There are other devices that are marketed as reducing sound, these make almost no difference in sound at the shooter's ear and mostly reduce the effects of concussion when used on rifles. (Witt SME, blast diverters, linear comps)
If you have to fire it inside your home and the cops show up, they'll take your gun and all the illegal

you did to it, especially if someone got shot.
This is why people recommend either a pistol or a pistol caliber carbine for "home defense" over a rifle, and to keep it legal, not mix and match legal and illegal stuff.
My experience has been that a 9mm pistol caliber carbine with a 16" barrel and linear compensator is just about shootable without ear pro for low round counts with no disorientation and effects on hearing just short of deafening. This still causes pain in the eardrums which is a sign of hearing loss being incurred but does not compare to indoor 5.56 without ear pro.