By accident..or on purpose ?
By accident; once, in about 65 years of hunting & shooting..still too much ! Marlin 39..must not have fully cleared the tube, just coming into the door of the kitchen when it went off. The only redeeming factor..I never point a gun at anything that can be killed...unless I intend to kill it...so I got a small hole in my ceiling tile. Checked the roof..no holes, must have caught a joist.
Intentionally..often.. I even spent some time shooting in/from my church. A couple woodchucks were undermining the footers at the rear of the church. These critters were very sly and wary..feasting upon the lush lawn, perhaps foraging no more than 50-75 feet from their holes. Everything being open behind the church and being situated in a small hamlet, I didn't want to raise any ire among residents, so I positioned myself about 3-4 feet behind a raised, stained glass window and used subsonic hollowpoints. Almost all sound contained inside the church..
One caution..when firing out an open window, be very careful, because somebody can come by close up so quickly...they could actually "run into" a bullet. My window was about 8.5 feet above the ground, so I was clear for a considerable distance.
I fire in my barn often in that same small hamlet. I have made a 45 degree, 1/4" steel backstop with sand catch. When I get ready to shoot, I turn up my barn radio to some loud metallic "music" which I could not otherwise stand... and shoot away.
I rarely use anything louder than .22 subsonics and I'm always doing "blacksmith things" in my barn anyway..along with neighbors who do similar things and for the most part..couldn't care less. Works good for preliminary sighting in before going to my woods or the gravel pit to complete the task.