The noise of a firearm comes from the free-air expansion of high-pressure gas escaping the muzzle. The sound from multiple guns does not add up linearly. Each gun's sound is a single pulse of pressure.
Two pulses at 150 dB, arriving at different times, is still only 150 dB. They are only equivalent to a single charge twice the size if synchronized down to a millisecond.
The shorter the weapon's barrel, as measured in calibers, the lower its chamber-to-muzzle pressure ratio, allowing more energy go into noise rather than projectile KE. Long barrels lower the muzzle pressure and thus the noise.
The closest proxy for noise levels is muzzle pressure. The amount of propellant doesn't matter as much. Exploding it in a grenade produces extreme (and, by design, lethal) pressure, just burning it almost none. Guns are in between these extremes.
Small caliber rifles tend to be tolerable (as in, very loud, but the hearing loss from a single shot is generally temporary), revolvers and shotguns are somewhat louder, while modern pistols and large caliber rifles can get extremely loud, requiring hearing protection.
Ballistic simulation software can predict muzzle pressure, including for black powder specifically. Unfortunately, I wasn't able to get information on powder formulations used in Napoleonic wars, which would allow for hard data. So I had to estimate it using modern black power, but with reduced heat of explosion, as if it had some inert material mixed in - accounting for dirt, dust, moisture, inaccurate part fractions, component crumbing in production.
For initial calculations, I've attempted to simulate historical black powder based on a DTIC study, but it produced higher performance than recorded. Comparing historical data to simulations worked out to Napoleonic era gunpowder being roughly equal to modern Fg class black powder with about 22% inert filler.
For the gun, the best data I could get is for the Canon de 12. It's possible to work it backwards from known performance perspective. I've matched the gun to produce 1440 fps (as reported) with a 1.8 kg black powder charge with a 6 kg projectile out of a 2300 mm barrel, as described.
In comparison, performance projections for the Charleville musket, using essentially the same propellant, look very different.
The initial burning rate factor is a bit of a tweak; it's determined by powder geometry and primer design, so used to be more of an art before the modern era. I matched it using a black powder estimator, to arrive at known performance of these muskets.
For noise, the number that matters is Muzzle Pressure, middle right tab. There is a 4-fold difference between muskets and cannons. This is pressure, not volume. as mentioned, the pressure from multiple muskets doesn't combine into one louder sound, it just makes the sound more continuous.
Calculating attenuation is more difficult. For a single cannon and a single musket, you could estimate that a cannon would be about as loud at 60 m as a musket at 1.75 m (shooter's ear to muzzle distance). For a full battlefield, Pieter's answer estimates roughly equal volume of gunpowder burned in cannons and in muskets. This means they'd fill it about as well, with the difference that cannons' muzzle gas would've been released at 4x the pressure, making it far overpower the muskets.
In short: cannons employed somewhat larger relative powder charges and operating pressures. They also had shorter barrels, only 18-20 calibers, compared to 63 calibers for the musket, which resulted in less pressure drop inside the barrel.
This means 4 times the pressure at the muzzle. A single loud noise nearly disables human hearing temporarily (and damages it permanently), making subsequent noises of lower volume inaudible.
It's probable (I'd give it at least 95% certainty) that the statement in the question held true for most participants, except for outliers that happened to be very far away from any cannon. That is, that the muskets were inaudible, being completely masked by temporary deafness from much louder cannon fire.