mikmod 32 and 64 bit builds for mingw

Discuss anything not covered by any of the other categories.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

mikmod 32 and 64 bit builds for mingw

Post by revelator »

after much tinkering i managed to compile mikmod static and dll build for mingw.
also availiable are 64 bit builds for mingw64.

mikmod is mostly used for old style xm music files like the ones in nehahra but can play other formats to.
my build supports loadable plugins thanks to the dlfcn-win32 project (linux style dlopen etc instead of the windows loadlibrary function)
while loadlibrary might be the correct choice it works quite fine with dlfcn-win32.

also availiable are builds of winpcap for mingw32 and 64 for emulating old network like ndis.

want to try it out with something really old ? i got a fresh build of dosbox from ykwhong (daum cafe) compiled with the above. load up yer ol blood or doom and go rip some :)

https://sourceforge.net/projects/cbadva ... nt%20Kits/? for the mikmod libraries.

http://code.google.com/p/realm/download ... z&can=2&q= for the dosbox build.

the winpcap drivers will be uploaded also if anyone requests them.
Productivity is a state of mind.
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: mikmod 32 and 64 bit builds for mingw

Post by leileilol »

As a tracker I really hate mikmod, how it hooks, and there's the panning and echo you can't control.

just letting you know a relevant opinion.





p.s. dumb library + foobar2000 foo_dumb's improvements to the dumb is better better better better better better better better better better better

p.p.s. libmodplug is a joke.
i should not be here
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: mikmod 32 and 64 bit builds for mingw

Post by revelator »

only use it with SDL_sound myself which seems to work ok but ill take your word for it :) ill have a look at dumb.
newer used modplug with anything tbh personally i prefer midas but so far i havent been able to get it to compile with mingw (weird build system).
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: mikmod 32 and 64 bit builds for mingw

Post by revelator »

hmm did some research on panning with mikmod and it seems to be possible by using VC_VoiceSetPanning echo however im not sure about.
the project seems abandoned so im taking it up to do some improvements on it.
Productivity is a state of mind.
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: mikmod 32 and 64 bit builds for mingw

Post by leileilol »

I have some regression tests for you

Some players hate some of the tricks I do (lots of note cut/delay, pitch tune, pattern reuse for small bits using pattern jump)
i should not be here
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: mikmod 32 and 64 bit builds for mingw

Post by revelator »

thanks :)
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: mikmod 32 and 64 bit builds for mingw

Post by revelator »

ive uploaded a build of mikwin with my changes to the library for mingw you can give it a spin if you like.

https://sourceforge.net/projects/cbadva ... nt%20Kits/

the regressions run fine :) funky.

had to change a few things with the preprocessor lookups since they where wrong (damn you msvc) i suspect this is what broke earlier mikmod builds.

Code: Select all

#define IMF_ProcessEnvelope(name) \
		memcpy(d->name##env,ih.name##env,IMFENVCNT);		\
		if(ih.name##flg&1) d->name##flg|=EF_ON;				\
		if(ih.name##flg&2) d->name##flg|=EF_SUSTAIN;		\
		if(ih.name##flg&4) d->name##flg|=EF_LOOP;			\
		d->name##susbeg=d->name##susend=ih.name##sus;		\
		d->name##beg=ih.name##beg;							\
		d->name##end=ih.name##end;							\
		d->name##pts=ih.name##pts;							\
                                                            \
		if((d->name##flg&EF_ON)&&(d->name##pts<2))			\
			d->name##flg&=~EF_ON;							\

		IMF_ProcessEnvelope(vol);
		IMF_ProcessEnvelope(pan);
		IMF_ProcessEnvelope(pit);
was

Code: Select all

#define IMF_ProcessEnvelope(name) \
		memcpy(d->##name##env,ih.##name##env,IMFENVCNT);		\
		if(ih.##name##flg&1) d->##name##flg|=EF_ON;				\
		if(ih.##name##flg&2) d->##name##flg|=EF_SUSTAIN;		\
		if(ih.##name##flg&4) d->##name##flg|=EF_LOOP;			\
		d->##name##susbeg=d->##name##susend=ih.##name##sus;		\
		d->##name##beg=ih.##name##beg;							\
		d->##name##end=ih.##name##end;							\
		d->##name##pts=ih.##name##pts;							\
                                                            \
		if((d->##name##flg&EF_ON)&&(d->##name##pts<2))			\
			d->##name##flg&=~EF_ON;							\

		IMF_ProcessEnvelope(vol);
		IMF_ProcessEnvelope(pan);
		IMF_ProcessEnvelope(pit);
so someone really went to town on the paste variable ## (cannot paste between a pointer and its value /facepalm extreme)
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: mikmod 32 and 64 bit builds for mingw

Post by revelator »

I see now why panning didnt work with mikmod earlier. It turns out that the only availiable windows version was the mikwin port which didnt have those yet while mine is a port to windows of mikmods latest version for unix which does.
so yup it works :) atleast now it does.
Mikmods console player however is broken (though i can compile it) theres no sound (probably caused by it using directsound pre win7).
The output can be seen on the volume meters though. SDL_sound's player however works fine with it.
Productivity is a state of mind.
drm_wayne
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: mikmod 32 and 64 bit builds for mingw

Post by drm_wayne »

sorry for bumping that, but is there a quake engine which can use mod/xm files for music playback?
It would be cool to use my oooold protracker mods as background music.

@lei: nice tunes :D
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: mikmod 32 and 64 bit builds for mingw

Post by leileilol »

Darkplaces.

Also, nehahra BUT THAT IS VILE VILE VILE VILE VILE VILE VILE
i should not be here
szo
Posts: 132
Joined: Mon Dec 06, 2010 4:42 pm

Re: mikmod 32 and 64 bit builds for mingw

Post by szo »

drm_wayne wrote:sorry for bumping that, but is there a quake engine which can use mod/xm files for music playback?
It would be cool to use my oooold protracker mods as background music.
Quakespasm has recently added support for tracker music, although you need to compile the code from the svn repository.

reckless: libmikmod-3.2.0 is utterly and inherently broken. use 3.3.3 or later releases from mikmod.sf.net
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: mikmod 32 and 64 bit builds for mingw

Post by revelator »

Allready done that :) actually a while ago posted the build in another thread.
Productivity is a state of mind.
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: mikmod 32 and 64 bit builds for mingw

Post by leileilol »

Anything about Dumb?

I'd prefer to use that because of the dos platform and the OGG support as an extra...
i should not be here
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: mikmod 32 and 64 bit builds for mingw

Post by revelator »

If you use MinGW64 then yes i have that compiled. both the 32 and 64 bit versions.

Hmm new mikmod makes use of OpenAL / SDL do mod files actually support surround ? or are there other reasons.
Productivity is a state of mind.
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: mikmod 32 and 64 bit builds for mingw

Post by leileilol »

No. They can only pan to left and right channels.

If only there were something that just goes into quake's paintbuffer stuff without extra dependencies...
i should not be here
Post Reply