FS#5585 - [Windows] Switching tracks quickly in jukebox

Attached to Project: OpenTTD
Opened by Brumi (Brumi) - Wednesday, 05 June 2013, 15:57 GMT
Last edited by Remko Bijker (Rubidium) - Saturday, 13 July 2013, 08:01 GMT
Type Bug
Category Core
Status New
Assigned To No-one
Operating System Windows
Severity Very Low
Priority Normal
Reported Version 1.3.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


If I switch tracks in the jukebox quickly by pressing 'next/previous track' multiple times in a quick succession, the wrong track will start playing. For example, if track 1 is playing, and then I press 'next' two times to play track 3, track 2 will play instead. The bug is present for me with all music sets.
This task depends upon

Comment by Pedro (Phrossi_TTD) - Tuesday, 18 June 2013, 17:37 GMT
Confirmed, happens to me too.
Proably cause is the game not updating the music quick enough?
Comment by Remko Bijker (Rubidium) - Saturday, 13 July 2013, 08:01 GMT
  • Field changed: Summary (Switching tracks quickly in jukebox → [Windows] Switching tracks quickly in jukebox)
I cannot reproduce this on Linux, and there seems to be quite a lot of magic w.r.t. waiting in the Windows music driver, so I suspect it to be Windows only.
Comment by Jaap (Jaap) - Tuesday, 12 November 2013, 16:56 GMT
I could reproduce it on Windows 7 64bit, also with the newest r25939.

It seems that the command to open the song takes too much time. When skipping some songs within a couple of seconds, the action to load the latest song will not be taken while the old song is loading.
I made a patch which compares the current song against the requested song to make sure that the correct song will be loaded finally.