[1.1.107] Too many silent alarms silence game sounds

This subforum contains all the issues which we already resolved.
Necandum
Inserter
Inserter
Posts: 39
Joined: Sat Jan 06, 2024 2:05 am
Contact:

[1.1.107] Too many silent alarms silence game sounds

Post by Necandum »

What:

Having too many programmable speakers active (sending an alarm) with volume set to zero and global playback enabled prevents many game sounds from being played. Music and some background noises continue (factory chugging etc.), but many interaction sounds are lost (placing buildings, combat etc.).

To reproduce:

On my machine, more than 180 programmable speakers will consistently trigger this effect, with these settings:
- condition: any > 0
- connected to a constant combinator (emitting red = 1)
- volume zero
- global playback enabled
- everything else disabled

At around 170 speakers the effect will only sometimes occur (sometimes playing a power pole makes a sound, sometimes not).

Expected Behaviour:
- game interaction sounds continue as normal regardless of how many silent speakers are active.

Please find save file attached, only mod is editor extensions. Please let me know if further information would be helpful.

Suggested fix:
- programmable speakers have option to not play alarm sound. This option is automatically selected if volume set to zero.
Attachments
_Sound Reaper Bug.zip
(1.6 MiB) Downloaded 67 times
Last edited by Necandum on Wed May 29, 2024 5:03 am, edited 1 time in total.

Donion
Factorio Staff
Factorio Staff
Posts: 290
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [1.1.107] Too many silent alarms silence game sounds

Post by Donion »

Hello,

the game has a hard limit on how many sounds can be played at any given time (192 by default, it can be changed in the hidden settings) and a sound at zero volume is still playing even though it's silent.
So using up all (or most) of the audio resources on silent programmable speaker is technically not a bug.
However I'll take a look if it would be a problem to just not play the sounds when the volume is zero (some other sounds do have such behaviour).

Using programmable speaker as a custom alarm machine without any sound is conceptually kinda weird, but feel free to crate a separate thread in the Ideas and Suggestions section.

Donion
Factorio Staff
Factorio Staff
Posts: 290
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [Donion] [1.1.107] Too many silent alarms silence game sounds

Post by Donion »

I took a look and sound of programmable speaker has a check for zero volume. Unless it's a global playback sound, in that case the check is skipped. So this is a bug after all.

mmmPI
Smart Inserter
Smart Inserter
Posts: 3575
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: [1.1.107] Too many silent alarms silence game sounds

Post by mmmPI »

Donion wrote:
Mon May 27, 2024 8:32 am
However I'll take a look if it would be a problem to just not play the sounds when the volume is zero (some other sounds do have such behaviour).
In vanilla factorio, you can't change the volume with circuits, so any speaker with the volume set as 0 is deactivated until manual intervention.

But things are different using this mod : https://mods.factorio.com/mod/musical-speaker-fixed

Because then you can change the volume of a sound with circuits, which means that for a 5 second long sound, you are able to play only the last second and make the 4 first silent by changing the volume signal automatically. This is a useful behavior to keep sound synchronized.

This may no longer be the case if the sound isn't playing at 0 volume when tasked to play a sound at 0 volume but would instead not play the sound at all or pause and restart the sound when volume is non-0 again.

The mod adds an additionnal signal slot called "control signal" to their speaker entity that can be set to any signal like combinators, and then sending value on that signal is used to "stop a sound from playing", which seem a more elegant way to deal with activation-deactivation of the speaker than playing it with volume 0 for the purpose of muting the speaker and hacking into an custom alarm machine.

(i would +1 suggested fix by OP : another tick box, 'on' by default that says "play a sound" like there exist "show alert".
When ticked "off" on some speakers they would not play a sound at all and thus do not count toward the 192 limit unlike silent speakers.)
I took a look and sound of programmable speaker has a check for zero volume. Unless it's a global playback sound, in that case the check is skipped. So this is a bug after all.
I though previous part before reading this, re-read the posts, re-considered I can always do with volume at 1 instead of 0, it really doesn't make a different for my purposes. It's not like i need the bug the be present and would welcome the fix :)

I still think the suggested fix (by OP) has some value, it would make it clear that there is "trigger condition" and "consequence of trigger". The later being either "only a sound" , "only an alert", or both.

Necandum
Inserter
Inserter
Posts: 39
Joined: Sat Jan 06, 2024 2:05 am
Contact:

Re: [Donion] [1.1.107] Too many silent alarms silence game sounds

Post by Necandum »

Hi Donion,

Thanks for the reply! I completely agree with you that it falls a little in the "if it hurts, just don't do that" category and I definitely know to avoid it now. However, as the behaviour is otherwise unexpected, some time went towards troubleshooting the cause, and it might be nice to prevent that for others.

You mention its a little weird, so I'll briefly explain why I'm doing this: its essentially a misconfiguration alert / basic debugging. I have a set of circuits to control train stations, that require configuration after creation (can't wait for parametrised blueprints!) and need to be connected to a central circuit network. If I forget to configure the circuits or its not connected, my central registry will be getting garbage data, and I really, really, really don't want to have to look through 150+ train stations to find the culprit.
Hence some basic alarms, which both indicate there is a problem, and where it is. But silent, because I don't necessarily want/need to deal with it promptly and any kind of audible alarm would get very annoying quickly.

Honestly, the current speakers suite my needs admirably, but maybe I'll suggest some additions to make it even more useful in the suggestions thread, as you mentioned.

Thanks for all the work you do to make the game even better than excellent!

Tertius
Filter Inserter
Filter Inserter
Posts: 904
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: [1.1.107] Too many silent alarms silence game sounds

Post by Tertius »

Donion wrote:
Mon May 27, 2024 8:32 am
Using programmable speaker as a custom alarm machine without any sound is conceptually kinda weird, but feel free to crate a separate thread in the Ideas and Suggestions section.
The programmable speaker is the only device that's able to create a user defined alert visible in my GUI. Or isn't it? I'm using it to raise silent alerts that have the severity of a warning to me. If a resource field gets empty, it's not so important I need a siren, but I'd like to know, so I deconstruct that mine outpost at some point later. And I use it to raise a silent alert, if some stacker in front of an array of unloading stations has less than some number of trains waiting. It's just a notification to myself ("might need another mine outpost, but not immediately").
The only alert I built with sound is the monitor for internal reactor power brownout and nuclear fuel cell supply.

In my opinion, it's not necessary to have an extra device that only sends user defined alerts without sound. However, if my GUI isn't conceptually part of the factory, so a speaker without sound has no meaning to the factory, some visual alarm facility like some alarm panel with text content could be added as visual counterpart. Is this what you mean if you mention ideas and suggestions?

Donion
Factorio Staff
Factorio Staff
Posts: 290
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [Donion] [1.1.107] Too many silent alarms silence game sounds

Post by Donion »

'Weird' probably wasn't the right word. I just found it kinda funny to build a speaker, a sound making machine, specifically not to play any sounds.
But I totally get the use case and its convenience and there's nothing wrong with that.

For the Ideas and Suggestions I meant creating a thread for the idea of having a checkbox in the speaker's GUI.

In any case, the fix for silent global programmable speaker sounds eating all the audio resources is done for 2.0.
In the meantime you should be able to use local playback mode silent alarms.

Necandum
Inserter
Inserter
Posts: 39
Joined: Sat Jan 06, 2024 2:05 am
Contact:

Re: [Donion] [1.1.107] Too many silent alarms silence game sounds

Post by Necandum »

Ah. Yea, now I think about it, that is pretty funny. C'est la vie.

Thank you!

Post Reply

Return to “Resolved Problems and Bugs”