Right i have included the .mod music into my program, and all is ok but the one thing i cannot figure out what to do is, (i want the .mod music to pause when the window of my program is not in focus.)

could anyone help me out.

Posted on 2001-10-14 09:51:19 by cyberuk
trap WM_SETFOCUS and WM_KILLFOCUS and make appropriate
calls to your mod player library.
Posted on 2001-10-14 11:06:53 by f0dder
hey! this is my first post so please don't be too rude if I post in the wrong place :)

i'd like to play a .mod file from my app having the .mod file included in my resources and with no external dll or shits... can someone help please ?

thanks in advance.
Posted on 2003-06-04 04:23:55 by goebish
goebish: you can use bassmod
but for this you must use an external .dll or you can include the dll in the exe (~36kb) using
different techniques (save to disk, PEBundle, ... )
Posted on 2003-06-04 04:40:57 by TBD
the problem with pebundle is that I have to use the Write-to-Disk Bundling method because of the .mod and I wouldn't like my .mod being copied to disk, I want to use it from memory....arghhh i've to find a way!!! :)

anyway thanks a lot for your quick reply !
Posted on 2003-06-04 05:15:25 by goebish
Posted on 2003-06-04 05:27:47 by iblis
anyone could post a simple template please ?
Posted on 2003-06-04 05:54:02 by goebish
as f0dder said, just handle the WM_SETFOCUS & WM_KILLFOCUS in your WndProc.

.elseif uMsg == WM_SETFOCUS
; start playing
.elseif uMsg == WM_KILLFOCUS
; stop playing

Posted on 2003-06-04 06:06:23 by Azrim
Mea culpa Azrim I should have started a new thread coz' your answer isn't the aim of my request :)
Posted on 2003-06-04 06:19:52 by goebish
sorry, I should be punished.
Posted on 2003-06-04 06:43:51 by Azrim
Is it really legal to bundle up the fmod.dll in your exe?
In fmods licence agreement it says

The FMOD.DLL file may be redistributed without the authors prior permission,
and must remain unmodified. The use of dll 'static linking' tools is
Posted on 2003-06-04 08:03:09 by david
I'd prefer to use the bassmod anyway coz' there's a version only playing mod/xm wich is only 36kb....
Posted on 2003-06-04 08:05:29 by goebish