The bug
Minecraft can only handle playing 247 different sounds at the same time. It's possible to exceed this limit by having enough sounds played simultaneously, such as by placing numerous armour stands on top of a waterlogged conduit which is underneath lava. This could be fixed by increasing the sound limit to something like 65527, which would be infeasible to achieve in conventional gameplay.
The fix
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 31
relates to 1
Attachments
Comments 89
It makes sense to me that the number of sounds played at a given time would have a cap, however if that's what's going on the priority seems screwed up, for as you pointed out, blaze ambience seems to win out over everything.
I would suggest the following priorities:
1. Player Damage
2. Mob Death/damage
3. block change (pistons, buttons)
4. Hostile Mob ambience
5. Passive mob ambience
6. Constant sounds (water, lava, fire [including blaze burning noise], rain)
obviously I have missed some sounds (minecarts, explosions, drops) but I think you get the point
I don't know how involved it is to code but I always wondered why entity to sound relationship within a time slice is 1-to-1? Within certain radius, new sound from an entity/block should not be generated/processed/emitted if the same type of (other) entity has the sound still playing. At the very least, to preserve ambiance, this should be capped at 3 and no more. Playing tens or hundreds of cows mooing in a pen makes neither any sense nor actually sounds any good with sound bytes eventually cutting each other out, not to mention causing way too many issues to be anywhere near worth it.
What really should happen is the game needs to detect how many of a particular sound source is within earshot of the player and if it is over X number of units, it should transition to a single sound file representing the entire multitude. For instance, if I have a certain number of chickens nearby, it will play "smallchickengroup.wav", or "mediumchickengroup.wav" or similar, rather than trying to call individual chicken noises for each chicken. This would be less resource intensive and it would be much more pleasant overall by avoiding phasing, chorusing, and overlap in the sfx.
To add a little bit of sophistication to the mix, the game might also try and still call individual chicken noises for any in your direct line of sight, even if within a larger group, as this would mimic how our brains actually filter sounds.
Bug still exists in 1.4.4
It is an old glitch. One I wish would be fixed.