yamraaj Posted April 22, 2006 Posted April 22, 2006 (edited) The tile says it all...how can i play xm files from resource files......i have found examples with tables but not with resourceinvoke uFMOD_PlaySong, ?????, ???????,XM_RESOURCE Edited April 22, 2006 by yamraaj
ALiEN Posted April 22, 2006 Posted April 22, 2006 Hi yamraaj!Well to play .xm files with UFmod you need 2 libs: ufmodapi.inc and ufmod.lib.Then create your .res file with some .xm on it and name it to '123' for example.Now you just need to use this: invoke uFMOD_PlaySong,123,hInstance,XM_RESOURCEhope this helps someone.ALiEN.
yamraaj Posted April 23, 2006 Author Posted April 23, 2006 Thanks but i m not getting it The resource id of the chip is 2003 invoke FindResource, hInstance, 2003, RT_RCDATAmov hResInfo, eax invoke LoadResource, hInstance, hResInfo mov hResData, eax invoke uFMOD_PlaySong,2003,hResInfo,XM_RESOURCE
ALiEN Posted April 23, 2006 Posted April 23, 2006 Why are you using invoke FindResource etc, etc?? Ok, i will try to explain better... So, create a .res file with some default dialog and make a button to play the .xm. Now add your xm file and as RESOURCE TYPE write 'RCDATA' and as RESOURCE NAME '123' for example. Now in your code add this libs: include ufmodapi.inc include \masm32\include\winmm.inc includelib ufmod.lib includelib \masm32\lib\uuid.lib includelib \masm32\lib\winmm.lib and in your button code add this: invoke uFMOD_PlaySong,123,hInstance,XM_RESOURCE Done! ALiEN. P.S: If you can't figure it out yourself feel free to say and I will write an example for you!
yamraaj Posted April 23, 2006 Author Posted April 23, 2006 (edited) EDit:problem was due to chip.. Edited April 23, 2006 by yamraaj
ALiEN Posted April 23, 2006 Posted April 23, 2006 (edited) Hi, I coded a little example for you! Take a look at it and if you can't understand where is the wrong in your code feel free to post here! The example is very simply and easy to follow... Good luck dude! uFMOD.example.rar ALiEN. Edited April 23, 2006 by ALiEN
yamraaj Posted April 23, 2006 Author Posted April 23, 2006 Many thanks for your code Alien i will check that..But i found that the chip i was using was not played by ufmod even though it was being played in xmplayer and winamp...i just changed the chip and voila it worked .........Thanks once again for taking some time for helping me...i have just started learning coding in asm ...way to go........Thanks
Hasl Posted May 8, 2006 Posted May 8, 2006 invoke FindResource, hInstance, 2003, RT_RCDATAmov hResInfo, eaxinvoke LoadResource, hInstance, hResInfomov hResData, eaxinvoke uFMOD_PlaySong,2003,hResInfo,XM_RESOURCEgood tips thanks..
mia Posted May 25, 2006 Posted May 25, 2006 Here is a tutorial i found on the net./>http://www.mytempdir.com/691377
diablo2oo2 Posted May 25, 2006 Posted May 25, 2006 latest ufmod version here. its smaller now...http://sourceforge.net/project/showfiles.php?group_id=158498
Ziggy Posted May 26, 2006 Posted May 26, 2006 latest ufmod version here. its smaller now...http://sourceforge.net/project/showfiles.php?group_id=158498Thanks diablo - pity it doesn't play other formats though - and conversions don't always sound good either.Z
Teddy Rogers Posted May 27, 2006 Posted May 27, 2006 How are you converting them Ziggy and to which formats? There are some weak conversion tools out there.Ted.
Ziggy Posted May 27, 2006 Posted May 27, 2006 How are you converting them Ziggy and to which formats? There are some weak conversion tools out there.Ted.Conversion is generally a waste of time - just get weird changes and rubbish. For anything other than XM I use bassmod. It's a pain because U need to bundle a dll (thanks PEBundle). But bassmod gives great results. I also use midi sometimes but have coded that separately.CheersZ
Teddy Rogers Posted May 27, 2006 Posted May 27, 2006 What tools have you tried for the conversions? It is not often that I get bad results converting other formats to XM with the tools I have here...Ted.
Ehtyar Posted June 14, 2006 Posted June 14, 2006 just put the dll in resources an use CreateFile and LoadLibrary at runtime
hibernator Posted March 18, 2012 Posted March 18, 2012 Win32Asm says "fatal error LNK1104: cannot open file "uuid.lib" How to solve this problem ? ( I have both ufmod.lib and ufmod.inc files in the proper directory ! )
ragdog Posted March 18, 2012 Posted March 18, 2012 http://www.platinshare.com/files/IwXxmxZI1332070598
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now