Page 1 of 1

Game freezes for 1 or 2 sec upon music track change

Posted: 23 Jun 2005 11:15
by brutt01d
Subject.

I suppose it's a genuine bug in TTD patch. Cause in open TTD there's no such thingy.

Posted: 23 Jun 2005 11:19
by Hyronymus
Could just be a genuine TTD bug, have you tried running TTD without the patch to confirm it? Or perhaps your soundcard settings are off.

Posted: 23 Jun 2005 11:20
by Rob

Posted: 23 Jun 2005 12:18
by brutt01d
Rob wrote:FAQ !
I am really sorry! :(

This thread has to be deleted.

Posted: 23 Jun 2005 18:48
by orudge
TTD uses the old Windows MCI interface, which causes a delay with the MIDI functions. OpenTTD uses DirectMusic, but even the Win32/MCI MIDI driver is run in a separate thread, so it doesn't disrupt the gameplay as such.

Posted: 05 Jul 2005 14:23
by nicfer
Thanks for the help, I have the same problem (until now :P).

Re: Game freezes for 1 or 2 sec upon music track change

Posted: 19 Mar 2014 22:11
by j7n
This old problem has been irritating me for many years now. Recently I stumbled upon a post by Avery Lee / Phaeron the author of VirtualDub, who has traced down the issue in mciseq.dll driver, which is set to loop doing nothing for some kind of synchronization. The problem can be fixed by changing the sleep time from 4 to 0.

In mciseq.dll, look for these bytes

68 __ __ __ __ FF 15 __ __ __ __ 6A 04 __ __ __ __ __ __ C3

and change them to

68 __ __ __ __ FF 15 __ __ __ __ 6A 00 __ __ __ __ __ __ C3

Here I have pre-patched the file for a few operating system versions (XP SP1, XP SP2, XP SP3, Server 2003 SP2, Seven SP1). These are all 32-bit systems; I do not have a 64-bit system to test.

MCI_MIDI_Without_Pause_WinXP.rar

To replace a Windows system file, System File Protection must be defeated first, as usual.

With the patch applied, the Jazz Jukebox player now responds quickly with musicdriver = "win32", as well as in TTD/Windows. I can skip over many tracks and it will still play the song which is showing on the display.

Re: Game freezes for 1 or 2 sec upon music track change

Posted: 20 Mar 2014 15:42
by Lakie
Is there any changes we could within TTDPatch which could achieve similar results?

~ Lakie

Re: Game freezes for 1 or 2 sec upon music track change

Posted: 21 Mar 2014 15:24
by j7n
Not any that I know of, apart from not using the MCI driver. My understanding of programming is very limited.