[0.17.68] Stacked sound exceed expected volume

Bugs that are actually features.
Post Reply
User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 513
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

[0.17.68] Stacked sound exceed expected volume

Post by Mylon »

If more than one sound plays at once, the volume can get excessively loud.

A great example of this is playing multiplayer Warptorio (v0.88). The sound plays for each player, so when the warp button is clicked on a 10 player server everyone freaks out because it's far louder than it is in single player.

This also can be observed in multiplayer under high latency where attempting an action can cause a sound to play (such as a entity mined sound) multiple times

User avatar
invisus
Filter Inserter
Filter Inserter
Posts: 284
Joined: Fri Sep 21, 2018 5:33 pm
Contact:

Re: [0.17.68] Stacked sound exceed expected volume

Post by invisus »

Sounds like a possible dupe of viewtopic.php?f=30&t=75498 which should be in the next release.

Unsure however if that fix was specific to achievements or all sounds.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.68] Stacked sound exceed expected volume

Post by Klonan »

Well, thats how sounds work, I don't see what here is a bug to be fixed

If Warptorio is playing 10 sounds in the same tick, of course it would be loud

User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 513
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

Re: [0.17.68] Stacked sound exceed expected volume

Post by Mylon »

This does sound like a duplicate of that bug.

PyroFire
Filter Inserter
Filter Inserter
Posts: 356
Joined: Tue Mar 08, 2016 8:18 am
Contact:

Re: [0.17.68] Stacked sound exceed expected volume

Post by PyroFire »

Although this is mostly an issue with warptorio, i do like the idea of having a sound.play function that deals with the stacking problem internally.
It would have to be a param {no_stacking=true} though.

Funny to know the base game has a similar sound stacking problem.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.68] Stacked sound exceed expected volume

Post by Klonan »

PyroFire wrote:
Tue Oct 01, 2019 11:21 am
Although this is mostly an issue with warptorio, i do like the idea of having a sound.play function that deals with the stacking problem internally.
It would have to be a param {no_stacking=true} though.
Why not just only play the sound once?
If you are writing the code that tells the game when to play the sound, why not just write it to not play it more than once?

PyroFire
Filter Inserter
Filter Inserter
Posts: 356
Joined: Tue Mar 08, 2016 8:18 am
Contact:

Re: [0.17.68] Stacked sound exceed expected volume

Post by PyroFire »

Klonan wrote:
Tue Oct 01, 2019 12:01 pm
PyroFire wrote:
Tue Oct 01, 2019 11:21 am
Although this is mostly an issue with warptorio, i do like the idea of having a sound.play function that deals with the stacking problem internally.
It would have to be a param {no_stacking=true} though.
Why not just only play the sound once?
If you are writing the code that tells the game when to play the sound, why not just write it to not play it more than once?
Because there is no respect to surfaces.

https://lua-api.factorio.com/latest/Lua ... play_sound

Code: Select all

force.play_sound{path=path,position=vector(),surface=where???}

Is there a way to do this better?

Code: Select all

function entity.emitsound(e,path) for k,v in pairs(game.connected_players)do if(v.surface==e.surface)then v.play_sound{path=path,position=e.position} end end end

function players.playsound(path,f,pos) for k,v in pairs(game.connected_players)do if(not f or v.surface==f)then v.play_sound{path=path,position=pos} end end end
So i can do

Code: Select all

function forces.playsound(path,f,pos,fc) fc=fc or game.forces.player fc.play_sound{path=path,position=pos,surface=f} end

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.68] Stacked sound exceed expected volume

Post by Klonan »

PyroFire wrote:
Tue Oct 01, 2019 1:13 pm
Is there a way to do this better?
Whats wrong with this:
https://lua-api.factorio.com/latest/Lua ... play_sound

PyroFire
Filter Inserter
Filter Inserter
Posts: 356
Joined: Tue Mar 08, 2016 8:18 am
Contact:

Re: [0.17.68] Stacked sound exceed expected volume

Post by PyroFire »

Klonan wrote:
Tue Oct 01, 2019 1:15 pm
PyroFire wrote:
Tue Oct 01, 2019 1:13 pm
Is there a way to do this better?
Whats wrong with this:
https://lua-api.factorio.com/latest/Lua ... play_sound
That's perfect!

Post Reply

Return to “Not a bug”