www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/02/20:46:42

From: Elliott Oti <e DOT oti AT stud DOT warande DOT ruu DOT nl>
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
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 <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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019