📄 kbgm.pas
字号:
// H to Pas Converter Ver.0.20.23.1
// Date : 17 10 1999
// Source : Kbgm.h
{
拲堄!忋偺僿僢僟偼愨懳偵嶍彍丒曄峏偟側偄偱偔偩偝偄丅
偦傟傪庣偭偰偄偨偩偗傞尷傝丄偙偺pas僼傽僀儖傪Kbgm32.dll偺
巊梡偺偨傔偵巊偭偰偔偩偝偭偰傕峔偄傑偣傫丅
婎杮揑偵偼Kr.Shin偝傫攝晍偺Kbgm.h傪偦偺傑傑堏怉偟傑偟偨偑丄
堦晹幆暿巕傪曄峏偟偰偄傑偡丅
}
unit Kbgm;
{$X+}{$Z2}{$A-}
interface
uses Windows;
const
KBGMVER = $008;
type
PHDATA = ^THDATA;
THDATA = HGLOBAL;
const
ONCE = 0;
REPEATPlay = 1;
ENDLESS = 0;
GM_RESET = 0;
GS_RESET = 1;
VL_RESET1 = 2;
VL_RESET2 = 3;
XG_RESET = 4;
KBGM_ERROR_BASE = $1000;
KBGM_NOERROR = 0;
KBGM_WRONGID = KBGM_ERROR_BASE + 0;
KBGM_NOMEM = KBGM_ERROR_BASE + 1;
KBGM_UNKNOWNERROR = KBGM_ERROR_BASE + 2;
KBGM_STILLPLAYING = KBGM_ERROR_BASE + 3;
KBGM_WAIT = KBGM_ERROR_BASE + 4;
KBGM_NOTIMERRES = KBGM_ERROR_BASE + 5;
KBGM_TIMERERROR = KBGM_ERROR_BASE + 6;
KBGM_NOFILE = KBGM_ERROR_BASE + 7;
KBGM_READERROR = KBGM_ERROR_BASE + 8;
KBGM_WRONGFILE = KBGM_ERROR_BASE + 9;
KBGM_PAGELOCKFAILED = KBGM_ERROR_BASE + 10;
KBGM_NOBUFFER = KBGM_ERROR_BASE + 11;
KBGM_NOTIME = KBGM_ERROR_BASE + 12;
KBGM_NOTPLAYING = KBGM_ERROR_BASE + 13;
KBGM_NORESOURCE = KBGM_ERROR_BASE + 14;
KBGM_WRONGCH = KBGM_ERROR_BASE + 15;
type
TSMFINFO = record
Tempo : UINT; //僥儞億
Playing : BOOL; //墘憈僼儔僌
Timebase : DWORD; //僞僀儉儀乕僗
Volume : UINT; //儅僗僞乕儃儕儏乕儉
T_Global : HGLOBAL;
Title : PByte; //僞僀僩儖奿擺梡
T_Length : DWORD; //僞僀僩儖偺挿偝
SongPtr : DWORD; //僜儞僌億僀儞僞
Times : DWORD; //壗夞墘憈偟偨偐
Note : array[0..15,0..127] of BOOL; //壒偑柭偭偰偄傞偐斲偐
end;
PSMFINFO = ^TSMFINFO;
function KBGMOpen(nTimerRes: UINT; IDDevice: UINT): UINT; stdcall;
function KBGMClose: UINT; stdcall;
function KBGMPlay(hData: THDATA; theType: UINT): UINT; stdcall;
function KBGMResume(hData: THDATA): UINT; stdcall;
function KBGMStop: UINT; stdcall;
function KBGMPause: UINT; stdcall;
function KBGMFree(hData: THDATA): UINT; stdcall;
// function KBGMLoadRes(lphData: PHDATA; hInstApp: HINSTANCE; resname: LPCSTR; restype: LPCSTR): UINT; stdcall;
//extern UINT WINFARPROC KBGMLoadResVB( LPHDATA lphData, LPBYTE data);
function KBGMLoadFile(hData: PHDATA; filename: LPSTR): UINT; stdcall;
function KBGMInit(hData: THDATA): UINT; stdcall;
function KBGMGetInfo(hData: THDATA; lpSmfInfo: PSMFINFO): UINT; stdcall;
function KBGMSetVolume(hData: THDATA; Volume: UINT): UINT; stdcall;
function KBGMSendSysx(theType: UINT): UINT; stdcall;
function KBGMFadeIn(hData: THDATA; Sec: UINT): UINT; stdcall;
function KBGMFadeOut(hData: THDATA; Sec: UINT): UINT; stdcall;
function KBGMSetTempo(hData: THDATA; Beat: UINT): UINT; stdcall;
function KBGMSeek(hData: THDATA; Tick: LongInt): UINT; stdcall;
function KBGMSetRepeat(hData: THDATA; Times: DWORD; Seek: DWORD): UINT; stdcall;
function KBGMNoteOn(ChNum: BYTE; Note: BYTE; Vel: BYTE): UINT; stdcall;
function KBGMSetCtrl(ChNum: BYTE; Data1: BYTE; Data2: BYTE): UINT; stdcall;
function KBGMSetPrg(ChNum: BYTE; Pnum: BYTE): UINT; stdcall;
implementation
const
Kbgm32 = 'Kbgm32.dll';
function KBGMOpen; external Kbgm32 name 'KBGMOpen';
function KBGMClose; external Kbgm32 name 'KBGMClose';
function KBGMPlay; external Kbgm32 name 'KBGMPlay';
function KBGMResume; external Kbgm32 name 'KBGMResume';
function KBGMStop; external Kbgm32 name 'KBGMStop';
function KBGMPause; external Kbgm32 name 'KBGMPause';
function KBGMFree; external Kbgm32 name 'KBGMFree';
// function KBGMLoadRes; external Kbgm32 name 'KBGMLoadRes';
function KBGMLoadFile; external Kbgm32 name 'KBGMLoadFile';
function KBGMInit; external Kbgm32 name 'KBGMInit';
function KBGMGetInfo; external Kbgm32 name 'KBGMGetInfo';
function KBGMSetVolume; external Kbgm32 name 'KBGMSetVolume';
function KBGMSendSysx; external Kbgm32 name 'KBGMSendSysx';
function KBGMFadeIn; external Kbgm32 name 'KBGMFadeIn';
function KBGMFadeOut; external Kbgm32 name 'KBGMFadeOut';
function KBGMSetTempo; external Kbgm32 name 'KBGMSetTempo';
function KBGMSeek; external Kbgm32 name 'KBGMSeek';
function KBGMSetRepeat; external Kbgm32 name 'KBGMSetRepeat';
function KBGMNoteOn; external Kbgm32 name 'KBGMNoteOn';
function KBGMSetCtrl; external Kbgm32 name 'KBGMSetCtrl';
function KBGMSetPrg; external Kbgm32 name 'KBGMSetPrg';
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -