📄 bass.pas
字号:
flags: DWORD; // BASS_SAMPLE/STREAM/MUSIC/SPEAKER flags
ctype: DWORD; // type of channel
origres: DWORD; // original resolution
plugin: HPLUGIN; // plugin
end;
BASS_PLUGINFORM = record
ctype: DWORD; // channel type
name: PChar; // format description
exts: PChar; // file extension filter (*.ext1;*.ext2;etc...)
end;
PBASS_PLUGINFORMS = ^TBASS_PLUGINFORMS;
TBASS_PLUGINFORMS = array[0..maxInt div sizeOf(BASS_PLUGINFORM) - 1] of BASS_PLUGINFORM;
BASS_PLUGININFO = record
version: DWORD; // version (same form as BASS_GetVersion)
formatc: DWORD; // number of formats
formats: PBASS_PLUGINFORMS; // the array of formats
end;
PBASS_PLUGININFO = ^BASS_PLUGININFO;
// Sample info structure
BASS_SAMPLE = record
freq: DWORD; // default playback rate
volume: DWORD; // default volume (0-100)
pan: Integer; // default pan (-100=left, 0=middle, 100=right)
flags: DWORD; // BASS_SAMPLE_xxx flags
length: DWORD; // length (in samples, not bytes)
max: DWORD; // maximum simultaneous playbacks
origres: DWORD; // original resolution
chans: DWORD; // number of channels
mingap: DWORD; // minimum gap (ms) between creating channels
{
The following are the sample's default 3D attributes
(if the sample is 3D, BASS_SAMPLE_3D is in flags)
see BASS_ChannelSet3DAttributes
}
mode3d: DWORD; // BASS_3DMODE_xxx mode
mindist: FLOAT; // minimum distance
maxdist: FLOAT; // maximum distance
iangle: DWORD; // angle of inside projection cone
oangle: DWORD; // angle of outside projection cone
outvol: DWORD; // delta-volume outside the projection cone
{
The following are the defaults used if the sample uses the DirectX 7
voice allocation/management features.
}
vam: DWORD; // voice allocation/management flags (BASS_VAM_xxx)
priority: DWORD; // priority (0=lowest, $ffffffff=highest)
end;
// 3D vector (for 3D positions/velocities/orientations)
BASS_3DVECTOR = record
x: FLOAT; // +=right, -=left
y: FLOAT; // +=up, -=down
z: FLOAT; // +=front, -=behind
end;
BASS_FXCHORUS = record
fWetDryMix: FLOAT;
fDepth: FLOAT;
fFeedback: FLOAT;
fFrequency: FLOAT;
lWaveform: DWORD; // 0=triangle, 1=sine
fDelay: FLOAT;
lPhase: DWORD; // BASS_FX_PHASE_xxx
end;
BASS_FXCOMPRESSOR = record
fGain: FLOAT;
fAttack: FLOAT;
fRelease: FLOAT;
fThreshold: FLOAT;
fRatio: FLOAT;
fPredelay: FLOAT;
end;
BASS_FXDISTORTION = record
fGain: FLOAT;
fEdge: FLOAT;
fPostEQCenterFrequency: FLOAT;
fPostEQBandwidth: FLOAT;
fPreLowpassCutoff: FLOAT;
end;
BASS_FXECHO = record
fWetDryMix: FLOAT;
fFeedback: FLOAT;
fLeftDelay: FLOAT;
fRightDelay: FLOAT;
lPanDelay: BOOL;
end;
BASS_FXFLANGER = record
fWetDryMix: FLOAT;
fDepth: FLOAT;
fFeedback: FLOAT;
fFrequency: FLOAT;
lWaveform: DWORD; // 0=triangle, 1=sine
fDelay: FLOAT;
lPhase: DWORD; // BASS_FX_PHASE_xxx
end;
BASS_FXGARGLE = record
dwRateHz: DWORD; // Rate of modulation in hz
dwWaveShape: DWORD; // 0=triangle, 1=square
end;
BASS_FXI3DL2REVERB = record
lRoom: Longint; // [-10000, 0] default: -1000 mB
lRoomHF: Longint; // [-10000, 0] default: 0 mB
flRoomRolloffFactor: FLOAT; // [0.0, 10.0] default: 0.0
flDecayTime: FLOAT; // [0.1, 20.0] default: 1.49s
flDecayHFRatio: FLOAT; // [0.1, 2.0] default: 0.83
lReflections: Longint; // [-10000, 1000] default: -2602 mB
flReflectionsDelay: FLOAT; // [0.0, 0.3] default: 0.007 s
lReverb: Longint; // [-10000, 2000] default: 200 mB
flReverbDelay: FLOAT; // [0.0, 0.1] default: 0.011 s
flDiffusion: FLOAT; // [0.0, 100.0] default: 100.0 %
flDensity: FLOAT; // [0.0, 100.0] default: 100.0 %
flHFReference: FLOAT; // [20.0, 20000.0] default: 5000.0 Hz
end;
BASS_FXPARAMEQ = record
fCenter: FLOAT;
fBandwidth: FLOAT;
fGain: FLOAT;
end;
BASS_FXREVERB = record
fInGain: FLOAT; // [-96.0,0.0] default: 0.0 dB
fReverbMix: FLOAT; // [-96.0,0.0] default: 0.0 db
fReverbTime: FLOAT; // [0.001,3000.0] default: 1000.0 ms
fHighFreqRTRatio: FLOAT; // [0.001,0.999] default: 0.001
end;
// callback function types
STREAMPROC = function(handle: HSTREAM; buffer: Pointer; length: DWORD; user: DWORD): DWORD; stdcall;
{
User stream callback function. NOTE: A stream function should obviously be as
quick as possible, other streams (and MOD musics) can't be mixed until
it's finished.
handle : The stream that needs writing
buffer : Buffer to write the samples in
length : Number of bytes to write
user : The 'user' parameter value given when calling BASS_StreamCreate
RETURN : Number of bytes written. Set the BASS_STREAMPROC_END flag to end
the stream.
}
STREAMFILEPROC = function(action, param1, param2, user: DWORD): DWORD; stdcall;
{
User file stream callback function.
action : The action to perform, one of BASS_FILE_xxx values.
param1 : Depends on "action"
param2 : Depends on "action"
user : The 'user' parameter value given when calling BASS_StreamCreate
RETURN : Depends on "action"
}
DOWNLOADPROC = procedure(buffer: Pointer; length: DWORD; user: DWORD); stdcall;
{
Internet stream download callback function.
buffer : Buffer containing the downloaded data... NULL=end of download
length : Number of bytes in the buffer
user : The 'user' parameter value given when calling BASS_StreamCreateURL
}
SYNCPROC = procedure(handle: HSYNC; channel, data: DWORD; user: DWORD); stdcall;
{
Sync callback function. NOTE: a sync callback function should be very
quick as other syncs cannot be processed until it has finished. If the
sync is a "mixtime" sync, then other streams and MOD musics can not be
mixed until it's finished either.
handle : The sync that has occured
channel: Channel that the sync occured in
data : Additional data associated with the sync's occurance
user : The 'user' parameter given when calling BASS_ChannelSetSync
}
DSPPROC = procedure(handle: HDSP; channel: DWORD; buffer: Pointer; length: DWORD; user: DWORD); stdcall;
{
DSP callback function. NOTE: A DSP function should obviously be as quick
as possible... other DSP functions, streams and MOD musics can not be
processed until it's finished.
handle : The DSP handle
channel: Channel that the DSP is being applied to
buffer : Buffer to apply the DSP to
length : Number of bytes in the buffer
user : The 'user' parameter given when calling BASS_ChannelSetDSP
}
RECORDPROC = function(handle: HRECORD; buffer: Pointer; length: DWORD; user: DWORD): BOOL; stdcall;
{
Recording callback function.
handle : The recording handle
buffer : Buffer containing the recorded sample data
length : Number of bytes
user : The 'user' parameter value given when calling BASS_RecordStart
RETURN : TRUE = continue recording, FALSE = stop
}
// Functions
var
BASS_SetConfig: function(option, value: DWORD): DWORD; stdcall;
BASS_GetConfig: function(option: DWORD): DWORD; stdcall;
BASS_GetVersion: function: DWORD; stdcall;
BASS_GetDeviceDescription: function(device: DWORD): PChar; stdcall;
BASS_ErrorGetCode: function: Integer; stdcall;
BASS_Init: function(device: Integer; freq, flags: DWORD; win: HWND; clsid: PGUID): BOOL; stdcall;
BASS_SetDevice: function(device: DWORD): BOOL; stdcall;
BASS_GetDevice: function: DWORD; stdcall;
BASS_Free: function: BOOL; stdcall;
BASS_GetDSoundObject: function(obj: DWORD): Pointer; stdcall;
BASS_GetInfo: function(var info: BASS_INFO): BOOL; stdcall;
BASS_Update: function: BOOL; stdcall;
BASS_GetCPU: function: FLOAT; stdcall;
BASS_Start: function: BOOL; stdcall;
BASS_Stop: function: BOOL; stdcall;
BASS_Pause: function: BOOL; stdcall;
BASS_SetVolume: function(volume: DWORD): BOOL; stdcall;
BASS_GetVolume: function: Integer; stdcall;
BASS_PluginLoad: function(filename: PChar; flags: DWORD): HPLUGIN; stdcall;
BASS_PluginFree: function(handle: HPLUGIN): BOOL; stdcall;
BASS_PluginGetInfo: function(handle: HPLUGIN): PBASS_PLUGININFO; stdcall;
BASS_Set3DFactors: function(distf, rollf, doppf: FLOAT): BOOL; stdcall;
BASS_Get3DFactors: function(var distf, rollf, doppf: FLOAT): BOOL; stdcall;
BASS_Set3DPosition: function(var pos, vel, front, top: BASS_3DVECTOR): BOOL; stdcall;
BASS_Get3DPosition: function(var pos, vel, front, top: BASS_3DVECTOR): BOOL; stdcall;
BASS_Apply3D: procedure; stdcall;
BASS_SetEAXParameters: function(env: Integer; vol, decay, damp: FLOAT): BOOL; stdcall;
BASS_GetEAXParameters: function(var env: DWORD; var vol, decay, damp: FLOAT): BOOL; stdcall;
BASS_MusicLoad: function(mem: BOOL; f: Pointer; offset, length, flags, freq: DWORD): HMUSIC; stdcall;
BASS_MusicFree: function(handle: HMUSIC): BOOL; stdcall;
BASS_MusicSetAttribute: function(handle: HMUSIC; attrib,value: DWORD): DWORD; stdcall;
BASS_MusicGetAttribute: function(handle: HMUSIC; attrib: DWORD): DWORD; stdcall;
BASS_MusicGetOrders: function(handle: HMUSIC): DWORD; stdcall;
BASS_MusicGetOrderPosition: function(handle: HMUSIC): DWORD; stdcall;
BASS_SampleLoad: function(mem: BOOL; f: Pointer; offset, length, max, flags: DWORD): HSAMPLE; stdcall;
BASS_SampleCreate: function(length, freq, chans, max, flags: DWORD): Pointer; stdcall;
BASS_SampleCreateDone: function: HSAMPLE; stdcall;
BASS_SampleFree: function(handle: HSAMPLE): BOOL; stdcall;
BASS_SampleGetInfo: function(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; stdcall;
BASS_SampleSetInfo: function(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; stdcall;
BASS_SampleGetChannel: function(handle: HSAMPLE; onlynew: BOOL): HCHANNEL; stdcall;
BASS_SampleStop: function(handle: HSAMPLE): BOOL; stdcall;
BASS_StreamCreate: function(freq, chans, flags: DWORD; proc: Pointer; user: DWORD): HSTREAM; stdcall;
BASS_StreamCreateFile: function(mem: BOOL; f: Pointer; offset, length, flags: DWORD): HSTREAM; stdcall;
BASS_StreamCreateURL: function(url: PChar; offset: DWORD; flags: DWORD; proc: DOWNLOADPROC; user: DWORD):HSTREAM; stdcall;
BASS_StreamCreateFileUser: function(buffered: BOOL; flags: DWORD; proc: STREAMFILEPROC; user: DWORD): HSTREAM; stdcall;
BASS_StreamFree: function(handle: HSTREAM): BOOL; stdcall;
BASS_StreamGetFilePosition: function(handle:HSTREAM; mode:DWORD) : DWORD;stdcall;
BASS_RecordGetDeviceDescription: function(devnum: DWORD):PChar;stdcall;
BASS_RecordInit: function(device: Integer):BOOL;stdcall;
BASS_RecordSetDevice: function(device: DWORD): BOOL; stdcall;
BASS_RecordGetDevice: function: DWORD; stdcall;
BASS_RecordFree: function:BOOL;stdcall;
BASS_RecordGetInfo: function(var info:BASS_RECORDINFO):BOOL;stdcall;
BASS_RecordGetInputName: function(input:Integer):PChar;stdcall;
BASS_RecordSetInput: function(input:Integer; setting:DWORD):BOOL;stdcall;
BASS_RecordGetInput: function(input:Integer):DWORD;stdcall;
BASS_RecordStart: function(freq,chans,flags:DWORD; proc:RECORDPROC; user:DWORD):HRECORD;stdcall;
BASS_ChannelBytes2Seconds: function(handle: DWORD; pos: QWORD): FLOAT; stdcall;
BASS_ChannelSeconds2Bytes: function(handle: DWORD; pos: FLOAT): QWORD; stdcall;
BASS_ChannelGetDevice: function(handle: DWORD): DWORD; stdcall;
BASS_ChannelSetDevice: function(handle, device: DWORD): BOOL; stdcall;
BASS_ChannelIsActive: function(handle: DWORD): DWORD; stdcall;
BASS_ChannelGetInfo: function(handle: DWORD; var info:BASS_CHANNELINFO):BOOL;stdcall;
BASS_ChannelGetTags: function(handle: HSTREAM; tags : DWORD): PChar; stdcall;
BASS_ChannelSetFlags: function(handle, flags: DWORD): BOOL; stdcall;
BASS_ChannelPreBuf: function(handle, length: DWORD): BOOL; stdcall;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -