📄 ufmod.inc
字号:
const
XM_RESOURCE = 0;
XM_MEMORY = 1;
XM_FILE = 2;
XM_NOLOOP = 8;
{
The uFMOD_PlaySong function starts playing an XM song.
--------------
Parameters:
lpXM
Specifies the song to play. If this parameter is nil,
any currently playing song is stopped. In such a case, function
does not return a meaningful value.
fdwSong parameter determines whether this value is interpreted
as a filename, as a resource identifier or a pointer to an image
of the song in memory.
param
Handle to the executable file that contains the resource to be
loaded or size of the image of the song in memory. This parameter
is ignored unless XM_RESOURCE or XM_MEMORY is specified in fdwSong.
fdwSong
Flags for playing the song. The following values are defined:
Value Meaning
XM_FILE lpXM points to filename.
param is ignored.
XM_MEMORY lpXM points to an image of a song in memory.
param is the image size. Once, uFMOD_PlaySong
returns, it's safe to free/discard the memory buffer.
XM_RESOURCE lpXM Specifies the name of the resource.
param identifies the module whose executable file
contains the resource.
The resource type must be RT_RCDATA.
XM_NOLOOP An XM track plays repeatedly by default. Specify
this flag to play it only once.
Return Values:
Returns a pointer to HWAVEOUT on success or NULL otherwise.
}
function uFMOD_PlaySong(
lpXM: Pointer;
param, fdwSong: Integer):
Integer; stdcall; external;
{ The uFMOD_StopSOng function stops the currently playing song, if any. }
procedure uFMOD_StopSong;
//var i : Integer;
begin
//i := uFMOD_PlaySong(nil, 0, 0);
end;
{ The uFMOD_Pause function pauses the currently playing song, if any. }
procedure uFMOD_Pause; external;
{ The uFMOD_Resume function resumes the currently paused song, if any. }
procedure uFMOD_Resume; external;
{
The uFMOD_GetStats function returns the current RMS volume coefficients
in L and R channels.
--------------
Return Values:
low-order word : RMS volume in R channel
hi-order word : RMS volume in L channel
}
function uFMOD_GetStats:Cardinal; stdcall; external;
{
The uFMOD_GetTime function returns the time in milliseconds since the
song was started. This is useful for synchronizing purposes.
--------------
Return Values:
Returns the time in milliseconds since the song was started.
}
function uFMOD_GetTime:Cardinal; stdcall; external;
{
The uFMOD_GetTitle function returns the current track's title, if any.
--------------
Return Values:
Returns the track's title in ASCIIZ format.
}
function uFMOD_GetTitle:PChar; stdcall; external;
{
The uFMOD_SetVolume function sets the global volume.
--------------
0: muting
64: maximum volume
NOTE: Any value above 64 maps to maximum volume too.
The volume scale is linear. Maximum volume is set by default.
}
procedure uFMOD_SetVolume(vol: Integer); stdcall; external;
{$L XMobj\ufmod.obj}
{$I XMobj\import.inc}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -