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

[分享]μFMOD v1.17 for Win32

2006-7-12 08:54
3750
μ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).

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

上传的附件:
收藏
免费 0
支持
分享
最新回复 (5)
雪    币: 3645
活跃值: (4212)
能力值: (RANK:215 )
在线值:
发帖
回帖
粉丝
2
delphi了怎么用,看不懂他的例子。
2006-7-19 20:40
0
雪    币: 208
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
最初由 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也放进去就可以了

2006-7-19 23:38
0
雪    币: 3645
活跃值: (4212)
能力值: (RANK:215 )
在线值:
发帖
回帖
粉丝
4
谢谢楼上的,我想弄delphi的玩玩
2006-7-20 00:01
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
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.
2006-7-29 02:11
0
雪    币: 242
活跃值: (10)
能力值: ( LV9,RANK:250 )
在线值:
发帖
回帖
粉丝
6
最初由 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.
2006-7-29 10:00
0
游客
登录 | 注册 方可回帖
返回
//