Page 1 of 1

[1.1.101] cyclic_sound stutters between sounds

Posted: Sat Jan 27, 2024 1:13 pm
by Ligh7bulb
There is a noticeable gap between sound effects when calling "cyclic_sound"

It is confirmed as when even using the same sound effects under an entity's "working_sound" parameter, it will have no gap and be a 100% smooth transition between sounds.

EG:

Code: Select all

my_item.attack_parameters = {cyclic_sound = {
		begin_sound = {{filename = "__my-mod__/sound/chaingun_begin.ogg", volume = 0.5},},
		middle_sound = {{filename = "__my-mod__/sound/chaingun_middle.ogg", volume = 0.5},},
		end_sound = {{filename = "__my-mod__/sound/chaingun_end.ogg", volume = 0.5},}
}}
.. compared to if it's via an entity's" working_sound" parameter such as ..

EG:

Code: Select all

{type = "car", name = "my-entity", working_sound = {
	activate_sound = {filename = "__my-mod__/sound/chaingun_begin.ogg", volume = 0.5},
	sound = {filename = "__my-mod__/sound/chaingun_middle.ogg", volume = 0.5},
	deactivate_sound = {filename = "__my-mod__/sound/chaingun_end.ogg", volume = 0.5},
}}

Re: [Donion] [1.1.101] cyclic_sound stutters between sounds

Posted: Mon Jan 29, 2024 5:29 pm
by Donion
Thanks for the report.
How large would you say the gap is? I can see where there would be a ~1 tick (1/60 second) gap between for example begin_sound and middle_sound.
Would you share the sounds you're testing with? You can send me a PM if you don't want to share them in this thread.

Re: [Donion] [1.1.101] cyclic_sound stutters between sounds

Posted: Fri Feb 02, 2024 1:54 pm
by Ligh7bulb
Maybe 50-100ms or so I’d guess but very audible. The sound itself didn’t seem to matter. Tried with .wav and .ogg with both smaller (high compression) and larger file sizes (low compression).

Re: [Donion] [1.1.101] cyclic_sound stutters between sounds

Posted: Fri Feb 02, 2024 2:04 pm
by Donion
I couldn't reproduce such large gap.
Do you have a piece of your mod code I could test with?

Re: [Donion] [1.1.101] cyclic_sound stutters between sounds

Posted: Sat Feb 03, 2024 9:24 am
by Ligh7bulb
Hi Donian,

I tried messaging you but it went to Outbox instead of Sent for some reason.

I quickly made a mod to demonstrate the bug. You or anyone can access the link here.

https://drive.google.com/file/d/12mTTkf ... sp=sharing

Not passworded. The ZIP also contains my audacity project file to show you it's just a single audio file split into 3. Also contains a quick video recording of my shooting the in-game flamethrower with attack_parameters.cyclic_sound assigned to that sound effect and the Tank's working_sound assigned to the same sound effect.

Re: [Donion] [1.1.101] cyclic_sound stutters between sounds

Posted: Sat Feb 03, 2024 11:23 am
by Donion
Excellent, thank you.
From the video it looks and sounds like the issue I've already discovered.

Re: [Donion] [1.1.101] cyclic_sound stutters between sounds

Posted: Sun Feb 04, 2024 8:45 am
by Ligh7bulb
Is this planned to be fixed in the next update?

Re: [Donion] [1.1.101] cyclic_sound stutters between sounds

Posted: Mon Feb 05, 2024 3:08 pm
by Donion
I consider this to be a minor issue, so I won't be fixing this in 1.1.
It is fixed for 2.0.

Re: [1.1.101] cyclic_sound stutters between sounds

Posted: Tue Feb 06, 2024 10:39 am
by Ligh7bulb
Aaaah thank you for your efforts :D Excellent!