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
Sound events
Moderator: OpenTTD Developers
- stefino_cz
- Transport Coordinator
- Posts: 268
- Joined: 02 Jul 2015 08:05
- Location: Czech Republic
- Contact:
Re: Sound events
Perhaps try making it a tick (30ms) longer or shorter, maybe 2. It may be that openttd has a slight delay.
- stefino_cz
- Transport Coordinator
- Posts: 268
- Joined: 02 Jul 2015 08:05
- Location: Czech Republic
- Contact:
Re: Sound events
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
https://bugs.openttd.org/task/5473
Re: Sound events
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.
- stefino_cz
- Transport Coordinator
- Posts: 268
- Joined: 02 Jul 2015 08:05
- Location: Czech Republic
- Contact:
Re: Sound events
I tried it too and it seems like 2nd possibilityGwyd 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.
Who is online
Users browsing this forum: No registered users and 13 guests