Page 1 of 1

Sound events

Posted: 03 Feb 2018 14:10
by stefino_cz
Hi all. I'm trying to make sound events for vehicles but I have a problem with length of sound tracks. Start sound is OK but in running vehicle and stopped vehicle there are periodic sound mistakes. Somethink like if two sound tracks are merged into one. I use SOUND_EVENT_RUNNING_16 - Every 16 engine ticks if in motion. I thought that if one tick is 30ms, so 16 ticks is 0,48s = track has length 0,48s. But no...it gives huge sound bugs.

How to make track what will sound correctly? It needs special length or what? Thanks a lot :)

Re: Sound events

Posted: 03 Feb 2018 14:29
by Gwyd
Perhaps try making it a tick (30ms) longer or shorter, maybe 2. It may be that openttd has a slight delay.

Re: Sound events

Posted: 03 Feb 2018 14:35
by stefino_cz
Yes but the problem is in period too. It seems that it is not constant :? This topic what was sent to me by frosh wrote about it. I tried length 0,53s and it gives a no-sound breaks. 0,54s gives "merged sound" mistakes.
https://bugs.openttd.org/task/5473

Re: Sound events

Posted: 03 Feb 2018 14:43
by Gwyd
What does SOUND_EVENT_RUNNING do? It says no more than once per tick, but once every movement. I think one of two things may happen: 1 it'll wait until the sound ends before playing again. 2 it'll repeat over different periods depending on how fast the vehicle is going.

Re: Sound events

Posted: 03 Feb 2018 14:48
by stefino_cz
Gwyd wrote:What does SOUND_EVENT_RUNNING do? It says no more than once per tick, but once every movement. I think one of two things may happen: 1 it'll wait until the sound ends before playing again. 2 it'll repeat over different periods depending on how fast the vehicle is going.
I tried it too and it seems like 2nd possibility