From: Elliott Oti Newsgroups: comp.os.msdos.djgpp Subject: Re: Two Brief Mikmod Questions Date: Thu, 02 Jan 1997 00:35:25 -0800 Organization: Academic Computer Centre Utrecht, (ACCU) Lines: 37 Message-ID: <32CB734D.547C@stud.warande.ruu.nl> References: <5aer27$bil AT betty DOT bway DOT net> NNTP-Posting-Host: warande1078.warande.ruu.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Wolfe Bowers wrote: > I want to play XMs and WAVs .. I know mikmod handles the mixing of > this. So that's cool. What source, libs, and headers do I need to do > this? (the minimum amount needed to compile into a program).. Get the source of MikMod or MikAlleg, run make on the makefile, and you get libmkmod.a (MikMod) or liballeg.a (MikAlleg). BTW you might want to clean up the source code in the s3m-loader and eliminate the instrument printout. You might also want to look at the soundcard initialising code, as it doesn't work 100% effectively on all cards. Then #include and link with either -lmkmod or -lalleg. > And my last question,.. I must use the virtual timer to keep the > XMs playing in the background, right? Could someone help me out with > this, either by explaining how that works or showing source code where > you have an XM player using the virtual timer (so that > the code can switch graphics modes, wait for input from the user, etc, > while the same XM is playing), or pointing me to some mikmod-newbie > webpages or FAQs. MikMod doesn't use a virtual timer, you have to poll it yourself. Basically you have to call MD_Update() once, every time your main loop executes. I suppose using MikAlleg you could use the virtual timer functions there to install MD_Update() as a callback function but I've never tried that; I tried implementing a mod player as a GUI dialog object but so far it leads to ugly crashes. For example source code try ftp://x2ftp.oulu.fi/pub/msdos/programming/utils/ez.zip for a textmode shell and mod player using MikMod. Hope that helped. Elliott