Severed bunny head
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Freedoom > Bug report: Windows 7 crippled by blank MIDIs
 
Author
All times are GMT. The time now is 03:34. Post New Thread    Post A Reply
Quasar
Moderator


Posts: 6175
Registered: 08-00


Windows 7 causes ports playing MIDI to pause every time the MIDI loops, so the tiny short blank MIDI that is being used as a placeholder renders ports such as Eternity completely unplayable, as they start to be interrupted constantly.

AFAIK there is no port-side fix to this other than to disable music entirely. I think it would be better if the place holder MIDI was not actually blank but was silence of a given reasonable length, say 3 minutes.

Is this change possible to make, or do I need to hack Eternity to disable music automatically in FreeDoom until suitable music has been written for all the songs?

Old Post 03-19-10 21:10 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
Catoptromancy
Senior Member


Posts: 1028
Registered: 08-06


http://free.doomers.org/

Fixed awhile ago, i think. Replaced all blank midis with whatever was in repo. Most of the Dave3d music was added and there still room for more!

The blank midi problem crashed boom202. 0.6.4 release was specifically to replace the copyrighted music that got in so blanks were added.

http://git.savannah.gnu.org/cgit/fr...tus/musics_list
http://git.savannah.gnu.org/cgit/fr...oom1musics_list

Last edited by Catoptromancy on 03-19-10 at 21:26

Old Post 03-19-10 21:21 #
Catoptromancy is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Ralphis
IDL Founder


Posts: 3745
Registered: 09-02


Anyway, if you guys ever do want to use a blank midi again use this one instead. There's actually a note being played for 30 minutes but the volume is set to 0.

Here it is: http://ralphis.unidoom.org/stuff/blank.mid

Old Post 03-19-10 21:58 #
Ralphis is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
fraggle
Filled with the code of Doom


Posts: 7830
Registered: 07-00


Sounds to me like SDL_mixer needs a new Windows native MIDI backend.

Old Post 03-19-10 22:04 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
Quasar
Moderator


Posts: 6175
Registered: 08-00



fraggle said:
Sounds to me like SDL_mixer needs a new Windows native MIDI backend.

I wish I could find out what the root cause of it is, but it's almost certainly something to do with the lack of the high-precision timer API that was originally used by MCI under XP and prior, but was removed in Vista.

Whatever it's doing in lieu of that causes the entire program to be preempted when the song loops. Input stops, digital sound starts to skip, video cannot be drawn. The process is locked, effectively. It is for a very brief period of time, but it is still annoying.

Old Post 03-20-10 02:31 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
GhostlyDeath
Forum Retard


Posts: 1041
Registered: 08-05



Quasar said:

I wish I could find out what the root cause of it is, but it's almost certainly something to do with the lack of the high-precision timer API that was originally used by MCI under XP and prior, but was removed in Vista.

Whatever it's doing in lieu of that causes the entire program to be preempted when the song loops. Input stops, digital sound starts to skip, video cannot be drawn. The process is locked, effectively. It is for a very brief period of time, but it is still annoying.



You could always push notes to be played like I do for ReMooD, all low level. You'd have to handle timing yourself however and load all the data yourself also.

Old Post 03-21-10 19:20 #
GhostlyDeath is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
andrewj
Senior Member


Posts: 1641
Registered: 04-02



GhostlyDeath said:
You could always push notes to be played like I do for ReMooD, all low level. You'd have to handle timing yourself however and load all the data yourself also.

Yeah this is what EDGE does, however it uses an old WIN32 timer callback system, timeSetEvent(), which is not good nowadays (it may even be deprecated now). Ideally the code would be using threads.

This is the code:
http://edge.svn.sourceforge.net/vie.../src/w32_mus.cc

Old Post 03-22-10 01:48 #
andrewj is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
GhostlyDeath
Forum Retard


Posts: 1041
Registered: 08-05



andrewj said:

Yeah this is what EDGE does, however it uses an old WIN32 timer callback system, timeSetEvent(), which is not good nowadays (it may even be deprecated now). Ideally the code would be using threads.

This is the code:
http://edge.svn.sourceforge.net/vie.../src/w32_mus.cc



http://remood.svn.sourceforge.net/v...c.c?view=markup

Respectively. Uses threads (if enabled).

Old Post 03-22-10 07:08 #
GhostlyDeath is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Quasar
Moderator


Posts: 6175
Registered: 08-00


AFAIK SDL_mixer's MCI callback is dispatched asynchronously from a winmm thread being run directly by kernel32.dll, because this is where the stack dump comes from when SDL crashes due to its multicore bug.

Of course the fact the multicore bug exists in the first place means there must be some serious problems in the implementation of this stuff.

Old Post 03-22-10 07:18 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
GhostlyDeath
Forum Retard


Posts: 1041
Registered: 08-05



Quasar said:
AFAIK SDL_mixer's MCI callback is dispatched asynchronously from a winmm thread being run directly by kernel32.dll, because this is where the stack dump comes from when SDL crashes due to its multicore bug.

Of course the fact the multicore bug exists in the first place means there must be some serious problems in the implementation of this stuff.



Do they use mutexes or whatnot at all?

Old Post 03-22-10 09:20 #
GhostlyDeath is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Quasar
Moderator


Posts: 6175
Registered: 08-00



GhostlyDeath said:


Do they use mutexes or whatnot at all?


I don't see any attempt at guarding the data that the callback accesses, and I already earlier identified at least one possible race condition that can occur when stopping a song. I reported it to SDL and they declined to fix it.

Old Post 03-22-10 16:36 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
Agent-H
Banned


Posts: 63
Registered: 04-10


Sice the latter half of the Vista age, hardly anything related to using doom on a more chocolatey source port won't work (very well).

Old Post 04-19-10 20:16 #
Agent-H is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
BlackJar72
Newbie


Posts: 2
Registered: 09-09


Windows 7 (ie, slightly upgraded Vista) suxs with midi in general -- a lot of professional music software won't even run Vista or Windows 7.

Old Post 06-16-10 19:46 #
BlackJar72 is offline Profile || Blog || Search || Add Buddy IP || Edit || Quote
wesleyjohnson
Senior Member


Posts: 1068
Registered: 04-09


I do not program Windows anymore, and I do not know if this even works in Linux, but a thought is to fork a separate process just to play the midi, and let Windows pause that one. Then you can do a proper communication with the new process to tell it which MIDI to play.
I know that Legacy runs three processes to play a game, and one is doing the music.

Of course, you may already be using a separate music process,
or Windows could be stopping all I/O to do some MIDI thing, or
Windows could be running a high-priority task (that is in a wait loop)
to get the MIDI started (because some media player needed it that way) and I wouldn't be surprised if it is the third one.

You could check the MIDI file/lump length and ignore any that are under 100 bytes long.

If more desperate, you could tweak the QUS midi converter to estimate
play time, and if too short, then duplicate multiple copies into the output buffer until some minimum play time criteria is met. That way the system does not get a short midi.

Could put a short engine generated midi (5 or 10 seconds of silence) appended onto short midi lumps, to extend them.

Last edited by wesleyjohnson on 06-17-10 at 21:18

Old Post 06-17-10 20:57 #
wesleyjohnson is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 03:34. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Freedoom > Bug report: Windows 7 crippled by blank MIDIs

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.