Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
40oz

Midi playback causes slight freezes

Recommended Posts

I've noticed on my PC across the many source ports I use, that the Midi playback is not very satisfying. I haven't tried ALL sourceports, but many of them share common results.

I typically use Chocolate Doom 1.2.0, PrBoom 2.5.0, and Odamex 0.4.4. When listening to music in game, the very end of the track causes a brief freeze in midi playback and gameplay, it's about 1/3rd of a second. It's not terribly noticeable, but is very annoying in the heat of fast paced gameplay. It's progressively more annoying and frequent if the music track is very short, i.e. D_E3M8. Turning the music all the way down of course doesn't actually turn off the music though. Also because of this delay it's ridiculously easy to identify the end of the track and tracks don't really 'loop' like they are supposed to. I've been coping with it for a pretty long time but it's really starting to get on my nerves now.

The only port where I have noticed this not happening in is Skulltag, which I use Timidity++ with. The music still doesn't loop correctly, there's always a gap between the end and the start of the track, but it doesn't interrupt gameplay.

Preferably I'd like to be playing Doom with smoothly looping music that doesn't interrupt my gameplay. Any suggestions to how I might go about that?

Share this post


Link to post

This will happen on Windows Vista or 7 in any port using SDL_mixer. Something about the way it utilizes the ancient old MCI Win32 API causes a complete lock to happen on all other threads in the process everytime the callback reaches the end of the stream. I have no idea what causes it, and it's certainly not obvious from examining the SDL_mixer source code.

Frankly it's probably a bug in the Vista audio stack or in the software MIDI synthesizer. MS doesn't give two shits about MIDI any more, and I wouldn't be surprised if the next version of Windows just doesn't support it without dedicated hardware being installed.

Share this post


Link to post

I have the same problem, but even worse. It stops for up to a second at times, and sometimes it even crash the game. Only in PRBoom+ though, not in (G)Zdoom or Skulltag

Share this post


Link to post
Quasar said:

This will happen on Windows Vista or 7 in any port using SDL_mixer.

Well, for what it's worth, I had that problem in Vista on my laptop with prboom+, but not anymore once I installed 7 on the same computer.

Share this post


Link to post
40oz said:

I have noticed this not happening ... I use Timidity++ ..


Yeah pretty much. I gave up a while ago and just use EAWPats now.

For ports using SDL_mixer the easiest way is to just dump EAWPats and a custom timidity.cfg into C:\timidity and SDL_mixer should find it. All the .cfg needs are the following.

dir C:\TiMidity
source gravis.cfg
source gsdrums.cfg
source gssfx.cfg
Alternatively you can remove the C:\ and put the timidity.cfg and the timidity folder with EAWPats in it in the port folder and it should work. Funny stuff like ..\timidity won't work though.

Finally, Urban Space Cowboy did find a fix to the screeching sound with SDL_mixer and EAWPats so if you have problems (with PrBoom for instance) then just replace SDL_mixer.dll with one from a resent PrBoom-Plus or Choco-Doom and that should take care of it.

Forgive me if you already knew this stuff.

Share this post


Link to post

As a MIDI artist, and avid collector of MIDIs, problems like these make me squirm. :( An OS that can't play MIDIs properly is effectively useless to me since it's the most important aspect of support I look out for.

Vista's MIDI support isn't fantastic, it has to be said (even I get some bad problems with some MIDIs/MUSes), and from the sounds of things, upgrading to 7 would only cause further issues.

I vastly prefer MIDI to virtually every other music format, yet it seems that Microsoft's OSes are getting worse and worse with regards to its support. I'll stick where I am (with Vista) for the moment.

[/$0.02]

Share this post


Link to post
Jimmy91 said:

As a MIDI artist, and avid collector of MIDIs, problems like these make me squirm. :( An OS that can't play MIDIs properly is effectively useless to me since it's the most important aspect of support I look out for.

Vista's MIDI support isn't fantastic, it has to be said (even I get some bad problems with some MIDIs/MUSes), and from the sounds of things, upgrading to 7 would only cause further issues.

I vastly prefer MIDI to virtually every other music format, yet it seems that Microsoft's OSes are getting worse and worse with regards to its support. I'll stick where I am (with Vista) for the moment.

[/$0.02]


There's always Debian. My keyboard functions normally when attached to it.

Share this post


Link to post
Jimmy91 said:

[/$0.02]


For the same reasons, I have stuck with XP (which still lets me control midi volume independent of system volume)

Share this post


Link to post

I have Windows 7, and midis play just fine here. I had to twiddle around a bit with the midi player in Skulltag before it worked, though.

Share this post


Link to post
Jimmy91 said:

Vista's MIDI support isn't fantastic, it has to be said (even I get some bad problems with some MIDIs/MUSes), and from the sounds of things, upgrading to 7 would only cause further issues.

7 is better with midis than Vista. Of course, the only difference I've noticed is the disappearance of that midi lag in prboom+, but that's already an improvement. :P Besides, since that one happens only in ports (and other programs) that use SDL for playing midis, it's technically an SDL bug, not a Windows bug. Not really surprising, considering that it wouldn't be the first lopsided thing that's been implemented in SDL.

Share this post


Link to post
Jodwin said:

7 is better with midis than Vista. Of course, the only difference I've noticed is the disappearance of that midi lag in prboom+, but that's already an improvement. :P Besides, since that one happens only in ports (and other programs) that use SDL for playing midis, it's technically an SDL bug, not a Windows bug. Not really surprising, considering that it wouldn't be the first lopsided thing that's been implemented in SDL.

So it's an SDL bug, not an SDL-mixer bug? I thought the two were separate.

Share this post


Link to post

Why would Timidity have a slight delay (a second to three) before the song starts again if using ZDoom or Skulltag but it loops flawlessly with the default MIDI playback option.

Share this post


Link to post

I haven't really conjured a solution out of this thread other than to upgrade my operating system. That seems like a huge change for a little benefit. Are there any alternatives?

Share this post


Link to post
40oz said:

I haven't really conjured a solution out of this thread other than to upgrade my operating system. That seems like a huge change for a little benefit. Are there any alternatives?

Write Ryan C. Gordon and ask him to fix the MIDI on newer Windows versions ;)

Share this post


Link to post
Mr. Chris said:

Why would Timidity have a slight delay (a second to three) before the song starts again if using ZDoom or Skulltag but it loops flawlessly with the default MIDI playback option.


I would like to know as well

Share this post


Link to post
Mr. Chris said:

Why would Timidity have a slight delay (a second to three) before the song starts again if using ZDoom or Skulltag but it loops flawlessly with the default MIDI playback option.

As far as I know, that's related to the switch from FMod (2.2.0 and earlier) to FModEX (2.3.0 and newer) as a sound library. That's why I keep both the latest and 2.2.0 of ZDoom around.

Share this post


Link to post

40oz said:
The only port where I have noticed this not happening in is Skulltag, which I use Timidity++ with. The music still doesn't loop correctly, there's always a gap between the end and the start of the track, but it doesn't interrupt gameplay.

Up until earlier today, I was using an older version of TiMidity for ZDoom. Randy Heit updated it some time back, in 2006, when Weeds Nagel pointed out some bugs not allowing his sound fonts to work properly. Today, I tried the new one, because I wanted to see how Weeds' sound fonts sound, and got a similar issue. Songs always had a moment of silence before starting. Of course, like an idiot I overwrote the old TiMidity, which isn't hosted on ZDoom.org anymore, leaving me stuck with the bugged newer one, with no way back...

Bye bye TiMidity for ZDoom, hello OPL emulation!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×