首页
社区
课程
招聘
[分享]μFMOD v1.17 for Win32
2006-7-12 08:54 3566

[分享]μFMOD v1.17 for Win32

2006-7-12 08:54
3566
μFMOD v1.17 for Win32
uFMOD is a tiny XM player library written in assembly language. It's perfect for size-critical applications (such as intros), click free, highly reliable, easy to use, open source. File, resource and direct memory playback supported. Usage examples available for most popular compilers (Visual C++, Visual Basic, PureBasic, Delphi, MASM32, FASM, NASM and TASM).

[培训]二进制漏洞攻防(第3期);满10人开班;模糊测试与工具使用二次开发;网络协议漏洞挖掘;Linux内核漏洞挖掘与利用;AOSP漏洞挖掘与利用;代码审计。

上传的附件:
收藏
点赞0
打赏
分享
最新回复 (5)
雪    币: 2909
活跃值: (3462)
能力值: (RANK:215 )
在线值:
发帖
回帖
粉丝
china 5 2006-7-19 20:40
2
0
delphi了怎么用,看不懂他的例子。
雪    币: 208
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
0cat0 2006-7-19 23:38
3
0
最初由 china 发布
delphi了怎么用,看不懂他的例子。


DELPHI我不懂,我用MASM调它很简单,只要如下几句就可以了:
include ..\uFMOD.inc
include ..\MyXM.asm
invoke uFMOD_PlaySong,addr xm,xm_length,XM_MEMORY ;播放音乐
invoke uFMOD_PlaySong,NULL,0,0 ;停止播放
然后在链接的时候,把uFMOD.obj也放进去就可以了

雪    币: 2909
活跃值: (3462)
能力值: (RANK:215 )
在线值:
发帖
回帖
粉丝
china 5 2006-7-20 00:01
4
0
谢谢楼上的,我想弄delphi的玩玩
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
Desmond 2006-7-29 02:11
5
0
WINMM version
Files required:
import.inc - contains Win32 API defs.
ufmod.inc - contains uFMOD API defs. and function descriptions.
ufmod.obj - the library itself

Now, in your Delphi source (*.dpr or *.pas) add the following lines:

{$I ufmod.inc}

Now, let's play an XM file:

uFMOD_PlaySong('somefile.xm',0,XM_FILE);

While it plays, let's pop up a message box to avoid our app exiting and stopping playback too early:

MessageBox(0,'uFMOD ruleZ!','.:Delphi:.',0);

Now, let's stop playback:

uFMOD_StopSong

Delphi whould say it can't convert a String into a plain Pointer, so let's modify the ufmod.inc file:

function uFMOD_PlaySong(
        lpXM: Pointer; { Place PChar  here instead of Pointer }
        param, fdwSong: Integer):
        Integer; stdcall; external;

That's all.

The example included in uFMOD package plays a track in memory instead of a file. You can convert an XM file into a memory hex dump using the eff.exe tool.

uFMOD also supports resource playback. Let me know if an explanation is required.

Dealing with DirectSound is a bit more complex, but the API is almost the same, just some additional steps required. Check the included example.

Best regards,
Desmond

P.S. Sorry, I don't speak chinesse.
雪    币: 242
活跃值: (10)
能力值: ( LV9,RANK:250 )
在线值:
发帖
回帖
粉丝
testkey 6 2006-7-29 10:00
6
0
最初由 Desmond 发布
WINMM version
Files required:
import.inc - contains Win32 API defs.
ufmod.inc - contains uFMOD API defs. and function descriptions.
ufmod.obj - the library itself
........


Thanks a lot.I'll try it.
游客
登录 | 注册 方可回帖
返回