You may be aware of a California Reddit user, OkCandidate103, with a Hyundai Elantra N who was ticketed for excessive noise and the trials and tribulations he went through. It's been in many magazines and on about a zillion sites. I haven't driven an Elantra N, one of Hyundai's 276 hp hot rods. I have driven a Kona N (https://www.brucehotchkiss.net/2022/11/son-youre-going-driving-me-to-drinking.html) and yes it is raucous in performance mode. I honestly didn't think it was that noisy but then I'm half deaf.
Hyundai's N models aren't alone in having an exhaust that lets the beast bellow. The Camaro ZL1, Mustang 5.0, and certain Hemi Dodges can be pretty loud under certain operating conditions.
The California Vehicle Code has two sections that deal with vehicle noise; 27150 and 27151. The first states in subsection (a) "Every motor vehicle subject to registration shall at all times be equipped with an adequate muffler in constant operation and properly maintained to prevent any excessive or unusual noise, and no muffler or exhaust system shall be equipped with a cutout, bypass, or similar device." And 27151 subsections (a) and (b) states in (a) "No person shall modify the exhaust system of a motor vehicle in a manner which will amplify or increase the noise emitted by the motor of the vehicle so that the vehicle is not in compliance with the provisions of Section 27150 or exceeds the noise limits established for the type of vehicle in Article 2.5 (commencing with Section 27200). No person shall operate a motor vehicle with an exhaust system so modified. And in (b) For the purposes of exhaust systems installed on motor vehicles with a manufacturer's gross vehicle weight rating of less than 6,000 pounds, other than motorcycles, a sound level of 95 dbA or less, when tested in accordance with Society of Automotive Engineers Standard J1169 May 1998, complies with this section. Motor vehicle exhaust systems or parts thereof include, but are not limited to, nonoriginal exhaust equipment."
According to most sources the ticket required the Elantra N to be taken to the California Bureau of Automotive Repair's (BAR) Referee for a noise test. These sources say that the test was done improperly.
I contacted the BAR to ask what test procedure they use for vehicle noise tests. This was their response "in accordance with Vehicle Code section 27150.2, the BAR Referee currently performs the SAE International J1492 test specification dated 2008. Beginning January 1, 2023, pursuant to Assembly Bill 2496 (Petrie-Norris, Chapter 595, Statutes of 2022), the Smog Check Referee will follow the “most current SAE International standard" which is currently the SAE International J1492 test specification dated 2021."
For clarification VC 27150.2 says the Referee can only perform an exhaust noise test if the vehicle has been cited (ticketed) under VC 27150 or 27151.
I won't quote the complete SAE test specification but in essence it says the test shall be conducted in "Any mode that can remain enabled through a power on/off cycle shall be included in the modes identified for compliance assessment.
To the best of my knowledge, and this was the case with the Kona N I drove, when you turn the vehicle off and restart it the mode defaults to the Normal (i.e. quiet) mode.
It would seem that in the case of the Elantra N either the test was not administered properly or someone fiddled with the Elantra N's computer so that it stayed in performance (loud) mode. I have no idea which of these is true, and I am not accusing anyone of malfeasance. I do know that where there's a will there is a way to modify vehicle computers.
I don't know what the ultimate outcome was for this specific vehicle, I've read unverified posts that the owner sold the car. I hope that didn't happen.
I do know that it is very, very unlikely that any car company would sell a vehicle that did not comply with vehicle laws including noise laws. They may slide sideways right up to the line but crossing the line would be very expensive.
Now I realize that everything you read on the Internet is true, as the old saying goes "I'm from Missouri" (the Show Me State).