Anuken / Mindustry

The automation tower defense RTS
https://mindustrygame.github.io
GNU General Public License v3.0
22.16k stars 2.93k forks source link

Custom Sounds (and normal sounds) not playing #1386

Closed MEEPofFaith closed 4 years ago

MEEPofFaith commented 4 years ago

Platform: Android and Windows 10

Build: 102.3

Issue: Commonly, sounds tend to become mute. It's probably a device limitation of just not playing the sound if lots are playing at once, but at the same time, I don't think so. If the muteness is from tons of sounds playing, why would the missile launch sound in my mod not play if it's the only sound playing.

Steps to reproduce: This seems to happen more often with custom sounds. I should probably check my code just in case, so I'll do that after commenting.

MEEPofFaith commented 4 years ago

Ok, so the code is correct as far as I'm concerned (unless there was a syntax change with sounds I'm unaware of).

MEEPofFaith commented 4 years ago

Maybe the sounds are too long? I mean, the missile launch sound is 4 seconds long...

Anuken commented 4 years ago

There is a limit of 16 sounds playing at once; even if the sound itself is silent, any sound being played after the limit is reached will cause interruptions and lack of sound.

sk7725 commented 4 years ago

Sometimes sounds just refuse to play. When i destor a single block or click on a node, it doesnt play the bok or click. But when I retry it(noticing the silence and breaking another block or clicking in another node) the sound plays. I am almost certain less that 16 sounds were playing at that time...

Anuken commented 4 years ago

Keep in mind that the 16 sound limit applies regardless of volume. Even if you have a few blocks emitting ambient noise at 0.001% volume, that still counts as a sound. The same applies to, say, a sound that's just 30 seconds of silence. With mods, it's hard to tell.

CA6 commented 4 years ago

Yeah 16 sounds if more is requested to play you get ear rape static or nothing at all

Anuken commented 4 years ago

Closing this, as it won't be changed until a new sound system is implemented.

MEEPofFaith commented 4 years ago

if 16 sounds are the limit... then 16 conveyer belts break the limit.