Posted April 22, 200619 yr 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, 200619 yr by yamraaj
April 22, 200619 yr 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.
April 23, 200619 yr Author 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
April 23, 200619 yr 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!
April 23, 200619 yr 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, 200619 yr by ALiEN
April 23, 200619 yr Author 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
May 8, 200619 yr invoke FindResource, hInstance, 2003, RT_RCDATAmov hResInfo, eaxinvoke LoadResource, hInstance, hResInfomov hResData, eaxinvoke uFMOD_PlaySong,2003,hResInfo,XM_RESOURCEgood tips thanks..
May 25, 200619 yr latest ufmod version here. its smaller now...http://sourceforge.net/project/showfiles.php?group_id=158498
May 26, 200619 yr 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
May 27, 200619 yr How are you converting them Ziggy and to which formats? There are some weak conversion tools out there.Ted.
May 27, 200619 yr 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
May 27, 200619 yr 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.
March 18, 201213 yr 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 ! )
Create an account or sign in to comment