Mail Archives: djgpp/1997/01/02/20:46:42
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 <mikmod.h> 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
- Raw text -