📄 internet_music_bass.bas
字号:
Global Const BASS_SYNC_END = 2
' Sync when a channel reaches the end.
' param: not used
' data : not used
Global Const BASS_SYNC_META = 4
' Sync when metadata is received in a stream.
' param: not used
' data : pointer to the metadata
Global Const BASS_SYNC_SLIDE = 5
' Sync when an attribute slide is completed.
' param: not used
' data : the type of slide completed (one of the BASS_SLIDE_xxx values)
Global Const BASS_SYNC_STALL = 6
' Sync when playback has stalled.
' param: not used
' data : 0=stalled, 1=resumed
Global Const BASS_SYNC_DOWNLOAD = 7
' Sync when downloading of an internet (or "buffered" user file) stream has ended.
' param: not used
' data : not used
Global Const BASS_SYNC_FREE = 8
' Sync when a channel is freed.
' param: not used
' data : not used
Global Const BASS_SYNC_MUSICPOS = 10
' Sync when a MOD music reaches an order:row position.
' param: LOWORD=order (0=first, -1=all) HIWORD=row (0=first, -1=all)
' data : LOWORD=order HIWORD=row
Global Const BASS_SYNC_MUSICINST = 1
' Sync when an instrument (sample for the non-instrument based formats)
' is played in a MOD music (not including retrigs).
' param: LOWORD=instrument (1=first) HIWORD=note (0=c0...119=b9, -1=all)
' data : LOWORD=note HIWORD=volume (0-64)
Global Const BASS_SYNC_MUSICFX = 3
' Sync when the "sync" effect (XM/MTM/MOD: E8x/Wxx, IT/S3M: S2x) is used.
' param: 0:data=pos, 1:data="x" value
' data : param=0: LOWORD=order HIWORD=row, param=1: "x" value
Global Const BASS_SYNC_MESSAGE = &H20000000 ' FLAG: post a Windows message (instead of callback)
' When using a window message "callback", the message to post is given in the "proc"
' parameter of BASS_ChannelSetSync, and is posted to the window specified in the BASS_Init
' call. The message parameters are: WPARAM = data, LPARAM = user.
Global Const BASS_SYNC_MIXTIME = &H40000000 ' FLAG: sync at mixtime, else at playtime
Global Const BASS_SYNC_ONETIME = &H80000000 ' FLAG: sync only once, else continuously
' BASS_ChannelIsActive return values
Global Const BASS_ACTIVE_STOPPED = 0
Global Const BASS_ACTIVE_PLAYING = 1
Global Const BASS_ACTIVE_STALLED = 2
Global Const BASS_ACTIVE_PAUSED = 3
' BASS_ChannelIsSliding return flags
Global Const BASS_SLIDE_FREQ = 1
Global Const BASS_SLIDE_VOL = 2
Global Const BASS_SLIDE_PAN = 4
' BASS_ChannelGetData flags
Global Const BASS_DATA_AVAILABLE = 0 ' query how much data is buffered
Global Const BASS_DATA_FLOAT = &H40000000 ' flag: return floating-point sample data
Global Const BASS_DATA_FFT512 = &H80000000 ' 512 sample FFT
Global Const BASS_DATA_FFT1024 = &H80000001 ' 1024 FFT
Global Const BASS_DATA_FFT2048 = &H80000002 ' 2048 FFT
Global Const BASS_DATA_FFT4096 = &H80000003 ' 4096 FFT
Global Const BASS_DATA_FFT_INDIVIDUAL = &H10 ' FFT flag: FFT for each channel, else all combined
Global Const BASS_DATA_FFT_NOWINDOW = &H20 ' FFT flag: no Hanning window
' BASS_RecordSetInput flags
Global Const BASS_INPUT_OFF = &H10000
Global Const BASS_INPUT_ON = &H20000
Global Const BASS_INPUT_LEVEL = &H40000
Global Const BASS_INPUT_TYPE_MASK = &HFF000000
Global Const BASS_INPUT_TYPE_UNDEF = &H0
Global Const BASS_INPUT_TYPE_DIGITAL = &H1000000
Global Const BASS_INPUT_TYPE_LINE = &H2000000
Global Const BASS_INPUT_TYPE_MIC = &H3000000
Global Const BASS_INPUT_TYPE_SYNTH = &H4000000
Global Const BASS_INPUT_TYPE_CD = &H5000000
Global Const BASS_INPUT_TYPE_PHONE = &H6000000
Global Const BASS_INPUT_TYPE_SPEAKER = &H7000000
Global Const BASS_INPUT_TYPE_WAVE = &H8000000
Global Const BASS_INPUT_TYPE_AUX = &H9000000
Global Const BASS_INPUT_TYPE_ANALOG = &HA000000
' BASS_MusicSet/GetAttribute options
Global Const BASS_MUSIC_ATTRIB_AMPLIFY = 0
Global Const BASS_MUSIC_ATTRIB_PANSEP = 1
Global Const BASS_MUSIC_ATTRIB_PSCALER = 2
Global Const BASS_MUSIC_ATTRIB_BPM = 3
Global Const BASS_MUSIC_ATTRIB_SPEED = 4
Global Const BASS_MUSIC_ATTRIB_VOL_GLOBAL = 5
Global Const BASS_MUSIC_ATTRIB_VOL_CHAN = &H100 ' + channel #
Global Const BASS_MUSIC_ATTRIB_VOL_INST = &H200 ' + instrument #
' BASS_Set/GetConfig options
Global Const BASS_CONFIG_BUFFER = 0
Global Const BASS_CONFIG_UPDATEPERIOD = 1
Global Const BASS_CONFIG_MAXVOL = 3
Global Const BASS_CONFIG_GVOL_SAMPLE = 4
Global Const BASS_CONFIG_GVOL_STREAM = 5
Global Const BASS_CONFIG_GVOL_MUSIC = 6
Global Const BASS_CONFIG_CURVE_VOL = 7
Global Const BASS_CONFIG_CURVE_PAN = 8
Global Const BASS_CONFIG_FLOATDSP = 9
Global Const BASS_CONFIG_3DALGORITHM = 10
Global Const BASS_CONFIG_NET_TIMEOUT = 11
Global Const BASS_CONFIG_NET_BUFFER = 12
Global Const BASS_CONFIG_PAUSE_NOPLAY = 13
Global Const BASS_CONFIG_NET_PREBUF = 15
Global Const BASS_CONFIG_NET_AGENT = 16
Global Const BASS_CONFIG_NET_PROXY = 17
Global Const BASS_CONFIG_NET_PASSIVE = 18
Global Const BASS_CONFIG_MP3_CODEC = 19
' BASS_StreamGetFilePosition modes
Global Const BASS_FILEPOS_CURRENT = 0
Global Const BASS_FILEPOS_DECODE = BASS_FILEPOS_CURRENT
Global Const BASS_FILEPOS_DOWNLOAD = 1
Global Const BASS_FILEPOS_END = 2
Global Const BASS_FILEPOS_START = 3
' STREAMFILEPROC actions
Global Const BASS_FILE_CLOSE = 0
Global Const BASS_FILE_READ = 1
Global Const BASS_FILE_LEN = 3
Global Const BASS_FILE_SEEK = 4
Global Const BASS_STREAMPROC_END = &H80000000 ' end of user stream flag
'**************************************************************
'* DirectSound interfaces (for use with BASS_GetDSoundObject) *
'**************************************************************
Global Const BASS_OBJECT_DS = 1 ' DirectSound
Global Const BASS_OBJECT_DS3DL = 2 'IDirectSound3DListener
'******************************
'* DX7 voice allocation flags *
'******************************
' Play the sample in hardware. If no hardware voices are available then
' the "play" call will fail
Global Const BASS_VAM_HARDWARE = 1
' Play the sample in software (ie. non-accelerated). No other VAM flags
'may be used together with this flag.
Global Const BASS_VAM_SOFTWARE = 2
'******************************
'* DX7 voice management flags *
'******************************
' These flags enable hardware resource stealing... if the hardware has no
' available voices, a currently playing buffer will be stopped to make room for
' the new buffer. NOTE: only samples loaded/created with the BASS_SAMPLE_VAM
' flag are considered for termination by the DX7 voice management.
' If there are no free hardware voices, the buffer to be terminated will be
' the one with the least time left to play.
Global Const BASS_VAM_TERM_TIME = 4
' If there are no free hardware voices, the buffer to be terminated will be
' one that was loaded/created with the BASS_SAMPLE_MUTEMAX flag and is beyond
' it 's max distance. If there are no buffers that match this criteria, then the
' "play" call will fail.
Global Const BASS_VAM_TERM_DIST = 8
' If there are no free hardware voices, the buffer to be terminated will be
' the one with the lowest priority.
Global Const BASS_VAM_TERM_PRIO = 16
'**********************************************************************
'* software 3D mixing algorithm modes (used with BASS_Set3DAlgorithm) *
'**********************************************************************
' default algorithm (currently translates to BASS_3DALG_OFF)
Global Const BASS_3DALG_DEFAULT = 0
' Uses normal left and right panning. The vertical axis is ignored except for
'scaling of volume due to distance. Doppler shift and volume scaling are still
'applied, but the 3D filtering is not performed. This is the most CPU efficient
'software implementation, but provides no virtual 3D audio effect. Head Related
'Transfer Function processing will not be done. Since only normal stereo panning
'is used, a channel using this algorithm may be accelerated by a 2D hardware
'voice if no free 3D hardware voices are available.
Global Const BASS_3DALG_OFF = 1
' This algorithm gives the highest quality 3D audio effect, but uses more CPU.
' Requires Windows 98 2nd Edition or Windows 2000 that uses WDM drivers, if this
' mode is not available then BASS_3DALG_OFF will be used instead.
Global Const BASS_3DALG_FULL = 2
' This algorithm gives a good 3D audio effect, and uses less CPU than the FULL
' mode. Requires Windows 98 2nd Edition or Windows 2000 that uses WDM drivers, if
' this mode is not available then BASS_3DALG_OFF will be used instead.
Global Const BASS_3DALG_LIGHT = 3
Type BASS_INFO
Flags As Long ' device capabilities (DSCAPS_xxx flags)
hwsize As Long ' size of total device hardware memory
hwfree As Long ' size of free device hardware memory
freesam As Long ' number of free sample slots in the hardware
free3d As Long ' number of free 3D sample slots in the hardware
minrate As Long ' min sample rate supported by the hardware
maxrate As Long ' max sample rate supported by the hardware
eax As Long ' device supports EAX? (always BASSFALSE if BASS_DEVICE_3D was not used)
minbuf As Long ' recommended minimum buffer length in ms (requires BASS_DEVICE_LATENCY)
dsver As Long ' DirectSound version
latency As Long ' delay (in ms) before start of playback (requires BASS_DEVICE_LATENCY)
initflags As Long ' "flags" parameter of BASS_Init call
speakers As Long ' number of speakers available
driver As Long ' driver
freq As Long ' current output rate (OSX only)
End Type
Type BASS_RECORDINFO
Flags As Long ' device capabilities (DSCCAPS_xxx flags)
formats As Long ' supported standard formats (WAVE_FORMAT_xxx flags)
inputs As Long ' number of inputs
singlein As Long ' BASSTRUE = only 1 input can be set at a time
driver As Long ' driver
freq As Long ' current input rate (OSX only)
End Type
Type BASS_SAMPLE
freq As Long ' default playback rate
volume As Long ' default volume (0-100)
Pan As Long ' default pan (-100=left, 0=middle, 100=right)
Flags As Long ' BASS_SAMPLE_xxx flags
length As Long ' length (in samples, not bytes)
max As Long ' maximum simultaneous playbacks
origres As Long ' original resolution
chans As Long ' number of channels
mingap As Long ' 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 As Long ' BASS_3DMODE_xxx mode
mindist As Single ' minimum distance
MAXDIST As Single ' maximum distance
iangle As Long ' angle of inside projection cone
oangle As Long ' angle of outside projection cone
outvol As Long ' delta-volume outside the projection cone
' The following are the defaults used if the sample uses the DirectX 7
' voice allocation/management features.
vam As Long ' voice allocation/management flags (BASS_VAM_xxx)
priority As Long ' priority (0=lowest, &Hffffffff=highest)
End Type
Type BASS_CHANNELINFO
freq As Long ' default playback rate
chans As Long ' channels
Flags As Long ' BASS_SAMPLE/STREAM/MUSIC/SPEAKER flags
ctype As Long ' type of channel
origres As Long ' original resolution
plugin As Long ' plugin
End Type
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -