miniFMOD v1.70 for PureBasic > 3.92

Developed or developing a new product in PureBasic? Tell the world about it.
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

miniFMOD v1.70 for PureBasic > 3.92

Post by traumatic »

I know this has been done before but AFAIK none of the libraries work
in newer versions of PureBasic (and don't allow for own callbacks) ...

from fmod.org:
This small XM replay system only adds 5k to your exe!
Pre-buffered output for 0 latency, and high output stability
100% click free.
XM sample callbacks for user generated or compressed XM samples!
File system callbacks so you can specify whatever loading system you like! (disk/wad/memory)
This version adds about 10kb to your exe because all effects have been
included. That way all XMs can be properly played.

Get it here: http://files.connection-refused.org/minifmod170_pb.zip

Thank you AlphaSND! :)
Last edited by traumatic on Fri Mar 17, 2006 8:08 am, edited 1 time in total.
Good programmers don't comment their code. It was hard to write, should be hard to read.
WolfgangS
Enthusiast
Enthusiast
Posts: 174
Joined: Fri Apr 25, 2003 3:30 pm

Post by WolfgangS »

Hi !
Nice :)

MFG
WolfgangS
WolfgangS' projects http://www.schliess.net
Quotation of the month:
<p3hicy>oder ich hol mir so eine geile aus asien
<p3hicy>die ständig poppen will
<p3hicy>'n brötchen pro tag reicht doch
<p3hicy>die essen eh' nich so viel
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

Wow ... excellent.

Thanks, traumatic :!:
regards,
benny!
-
pe0ple ar3 str4nge!!!
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post by THCM »

Hi traumatic!

Could you please release the source of the purebasic library?
The Human Code Machine / Masters' Design Group
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

THCM wrote:Could you please release the source of the purebasic library?
Sir, yes, sir! 8)

http://files.connection-refused.org/min ... pb_src.zip
Good programmers don't comment their code. It was hard to write, should be hard to read.
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

Post by chris_b »

this is a great library...but is it possible to add a function to control the volume of the music?
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Just grab the source and give it a go. :)
Good programmers don't comment their code. It was hard to write, should be hard to read.
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

Post by chris_b »

I don't really know anything about C or C++ but I guess I could see if I can figure something out.

Will the source work with the free MS Visual C++ Toolkit?
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

chris_b wrote:Will the source work with the free MS Visual C++ Toolkit?
Most likely yes.

As minifmod is using winmm, you might want to look for "waveOutSetVolume ()".

Something like:

Code: Select all

waveOutSetVolume(FSOUND_WaveOutHandle, 0x4711);
Good luck! :)
Good programmers don't comment their code. It was hard to write, should be hard to read.
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

Post by chris_b »

traumatic wrote:
chris_b wrote:Will the source work with the free MS Visual C++ Toolkit?
Most likely yes.
Well, I've installed the Visual C++ Toolkit and downloaded your source files but to be honest I have no idea where to start...

Before I try changing the source code I just want to compile the "Minifmod170" file that goes in the PureBasic "UserLibraries" folder, but I've tried Googling for help and have no information about what I should do :(
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Well, I guess I can't help you here. The source-zip contains the project-
workspace for VC6, maybe "Codeblocks" or any other free VC-IDE can
convert this file. If it's just about adding a volume control, I may find some
time to implement this but I can't promise anything as time is one of the
things I rarely have. So this may take a month or two...

Maybe someone else can help you out?
Good programmers don't comment their code. It was hard to write, should be hard to read.
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

Post by chris_b »

Thanks! Codeblocks looks like the starting point I needed :) It automatically detected the VC++ Toolkit and it seems to import the project workspace from your source OK so I'm all set for some experimenting!
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

Post by chris_b »

well everything seems to work (the PureBasic Library Maker warns that there is "no debugger routine" for the functions but I guess that's normal) but when I try to run the example xmplay.pb I get:

POLINK: warning: Multiple '.data' sections found with different flags (0xc0000040 and 0x60000040).
POLINK: error: Unresolved external symbol '__ftol2'.
POLINK: fatal error: 1 unresolved external(s).
KarLKoX
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Oct 06, 2003 7:13 pm
Location: France
Contact:

Post by KarLKoX »

Put somewhere in the sourcecode :

Code: Select all

int _ftol2;
"Qui baise trop bouffe un poil." P. Desproges

http://karlkox.blogspot.com/
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

Post by chris_b »

It made the POLINK errors disappear and xmplay.pb runs...but crashes immediately. Maybe CodeBlocks didn't correctly import the VC6 source after all?
Post Reply