📄 bass.inc
字号:
; BASS 2.4 MASM API, (c) 1999-2008 Ian Luck.
; Please report bugs/suggestions/etc... to bass@un4seen.com
; See the BASS.CHM file for more complete documentation
; Differences:
; BASS_SetEAXParameters [call] -> BASS_SetEAXParametersASM [macro]
; BASS_INFO.size -> BASS_INFO.ssize
; BASS_INFO.eax -> BASS_INFO.haseax
; BASS_RECORDINFO.size -> BASS_RECORDINFO.ssize
; BASS_SAMPLE.length -> BASS_SAMPLE.slength
BASSVERSION equ 204h ; API version
float TYPEDEF REAL4
double TYPEDEF REAL8
; Error codes returned by BASS_GetErrorCode()
BASS_OK equ 0 ; all is OK
BASS_ERROR_MEM equ 1 ; memory error
BASS_ERROR_FILEOPEN equ 2 ; can't open the file
BASS_ERROR_DRIVER equ 3 ; can't find a free/valid driver
BASS_ERROR_BUFLOST equ 4 ; the sample buffer was lost
BASS_ERROR_HANDLE equ 5 ; invalid handle
BASS_ERROR_FORMAT equ 6 ; unsupported sample format
BASS_ERROR_POSITION equ 7 ; invalid position
BASS_ERROR_INIT equ 8 ; BASS_Init has not been successfully called
BASS_ERROR_START equ 9 ; BASS_Start has not been successfully called
BASS_ERROR_ALREADY equ 14 ; already initialized/paused/whatever
BASS_ERROR_NOCHAN equ 18 ; can't get a free channel
BASS_ERROR_ILLTYPE equ 19 ; an illegal type was specified
BASS_ERROR_ILLPARAM equ 20 ; an illegal parameter was specified
BASS_ERROR_NO3D equ 21 ; no 3D support
BASS_ERROR_NOEAX equ 22 ; no EAX support
BASS_ERROR_DEVICE equ 23 ; illegal device number
BASS_ERROR_NOPLAY equ 24 ; not playing
BASS_ERROR_FREQ equ 25 ; illegal sample rate
BASS_ERROR_NOTFILE equ 27 ; the stream is not a file stream
BASS_ERROR_NOHW equ 29 ; no hardware voices available
BASS_ERROR_EMPTY equ 31 ; the MOD music has no sequence data
BASS_ERROR_NONET equ 32 ; no internet connection could be opened
BASS_ERROR_CREATE equ 33 ; couldn't create the file
BASS_ERROR_NOFX equ 34 ; effects are not enabled
BASS_ERROR_NOTAVAIL equ 37 ; requested data is not available
BASS_ERROR_DECODE equ 38 ; the channel is a "decoding channel"
BASS_ERROR_DX equ 39 ; a sufficient DirectX version is not installed
BASS_ERROR_TIMEOUT equ 40 ; connection timedout
BASS_ERROR_FILEFORM equ 41 ; unsupported file format
BASS_ERROR_SPEAKER equ 42 ; unavailable speaker
BASS_ERROR_VERSION equ 43 ; invalid BASS version (used by add-ons)
BASS_ERROR_CODEC equ 44 ; codec is not available/supported
BASS_ERROR_ENDED equ 45 ; the channel/file has ended
BASS_ERROR_UNKNOWN equ -1 ; some other mystery problem
; BASS_SetConfig options
BASS_CONFIG_BUFFER equ 0
BASS_CONFIG_UPDATEPERIOD equ 1
BASS_CONFIG_GVOL_SAMPLE equ 4
BASS_CONFIG_GVOL_STREAM equ 5
BASS_CONFIG_GVOL_MUSIC equ 6
BASS_CONFIG_CURVE_VOL equ 7
BASS_CONFIG_CURVE_PAN equ 8
BASS_CONFIG_FLOATDSP equ 9
BASS_CONFIG_3DALGORITHM equ 10
BASS_CONFIG_NET_TIMEOUT equ 11
BASS_CONFIG_NET_BUFFER equ 12
BASS_CONFIG_PAUSE_NOPLAY equ 13
BASS_CONFIG_NET_PREBUF equ 15
BASS_CONFIG_NET_PASSIVE equ 18
BASS_CONFIG_REC_BUFFER equ 19
BASS_CONFIG_NET_PLAYLIST equ 21
BASS_CONFIG_MUSIC_VIRTUAL equ 22
BASS_CONFIG_VERIFY equ 23
; BASS_SetConfigPtr options
BASS_CONFIG_NET_AGENT equ 16
BASS_CONFIG_NET_PROXY equ 17
; Initialization flags
BASS_DEVICE_8BITS equ 1 ; use 8 bit resolution, else 16 bit
BASS_DEVICE_MONO equ 2 ; use mono, else stereo
BASS_DEVICE_3D equ 4 ; enable 3D functionality
BASS_DEVICE_LATENCY equ 256 ; calculate device latency (BASS_INFO struct)
BASS_DEVICE_CPSPEAKERS equ 1024; detect speakers via Windows control panel
BASS_DEVICE_SPEAKERS equ 2048; force enabling of speaker assignment
BASS_DEVICE_NOSPEAKER equ 4096; ignore speaker arrangement
; DirectSound interfaces (for use with BASS_GetDSoundObject)
BASS_OBJECT_DS equ 1 ; IDirectSound
BASS_OBJECT_DS3DL equ 2 ; IDirectSound3DListener
; Device info structure
BASS_DEVICEINFO struct
name DWORD ? ; description
driver DWORD ? ; driver
flags DWORD ?
BASS_DEVICEINFO ends
; BASS_DEVICEINFO flags
BASS_DEVICE_ENABLED equ 1
BASS_DEVICE_DEFAULT equ 2
BASS_DEVICE_INIT equ 4
BASS_INFO struct
flags DWORD ? ; device capabilities (DSCAPS_xxx flags)
hwsize DWORD ? ; size of total device hardware memory
hwfree DWORD ? ; size of free device hardware memory
freesam DWORD ? ; number of free sample slots in the hardware
free3d DWORD ? ; number of free 3D sample slots in the hardware
minrate DWORD ? ; min sample rate supported by the hardware
maxrate DWORD ? ; max sample rate supported by the hardware
haseax DWORD ? ; device supports EAX? (always FALSE if BASS_DEVICE_3D was not used)
minbuf DWORD ? ; recommended minimum buffer length in ms (requires BASS_DEVICE_LATENCY)
dsver DWORD ? ; DirectSound version
latency DWORD ? ; delay (in ms) before start of playback (requires BASS_DEVICE_LATENCY)
initflags DWORD ? ; "flags" parameter of BASS_Init call
speakers DWORD ? ; number of speakers available
freq DWORD ? ; current output rate (OSX only)
win DWORD ? ; BASS_Init window handle
BASS_INFO ends
; BASS_INFO flags (from DSOUND.H)
DSCAPS_CONTINUOUSRATE equ 00000010h ; supports all sample rates between min/maxrate
DSCAPS_EMULDRIVER equ 00000020h ; device does NOT have hardware DirectSound support
DSCAPS_CERTIFIED equ 00000040h ; device driver has been certified by Microsoft
DSCAPS_SECONDARYMONO equ 00000100h ; mono
DSCAPS_SECONDARYSTEREO equ 00000200h ; stereo
DSCAPS_SECONDARY8BIT equ 00000400h ; 8 bit
DSCAPS_SECONDARY16BIT equ 00000800h ; 16 bit
; Recording device info structure
BASS_RECORDINFO struct
flags DWORD ? ; device capabilities (DSCCAPS_xxx flags)
formats DWORD ? ; supported standard formats (WAVE_FORMAT_xxx flags)
inputs DWORD ? ; number of inputs
singelin DWORD ? ; TRUE = only 1 input can be set at a time
freq DWORD ? ; current input rate (OSX only)
BASS_RECORDINFO ends
; BASS_RECORDINFO flags (from DSOUND.H)
DSCCAPS_EMULDRIVER equ DSCAPS_EMULDRIVER ; device does NOT have hardware DirectSound recording support
DSCCAPS_CERTIFIED equ DSCAPS_CERTIFIED ; device driver has been certified by Microsoft
; Sample info structure & flags
BASS_SAMPLE struct
freq DWORD ? ; default playback rate
volume float ? ; default volume (0-1)
pan float ? ; default pan (-1=left, 0=middle, 1=right)
flags DWORD ? ; BASS_SAMPLE_xxx flags
slength DWORD ? ; length (in samples, not bytes)
max DWORD ? ; maximum simultaneous playbacks
origres DWORD ? ; original resolution bits
chans DWORD ? ; number of channels
mingap DWORD ? ; minimum gap (ms) between creating channels
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 float ? ; delta-volume outside the projection cone
vam DWORD ? ; voice allocation/management flags (BASS_VAM_xxx)
priority DWORD ? ; priority (0=lowest, ffffffffh=highest)
BASS_SAMPLE ends
BASS_SAMPLE_8BITS equ 1 ; 8 bit
BASS_SAMPLE_FLOAT equ 256 ; 32-bit floating-point
BASS_SAMPLE_MONO equ 2 ; mono
BASS_SAMPLE_LOOP equ 4 ; looped
BASS_SAMPLE_3D equ 8 ; 3D functionality
BASS_SAMPLE_SOFTWARE equ 16 ; not using hardware mixing
BASS_SAMPLE_MUTEMAX equ 32 ; mute at max distance (3D only)
BASS_SAMPLE_VAM equ 64 ; DX7 voice allocation & management
BASS_SAMPLE_FX equ 128 ; old implementation of DX8 effects
BASS_SAMPLE_OVER_VOL equ 10000h ; override lowest volume
BASS_SAMPLE_OVER_POS equ 20000h ; override longest playing
BASS_SAMPLE_OVER_DIST equ 30000h ; override furthest from listener (3D only)
BASS_STREAM_PRESCAN equ 20000h ; enable pin-point seeking/length (MP3/MP2/MP1)
BASS_MP3_SETPOS equ BASS_STREAM_PRESCAN
BASS_STREAM_AUTOFREE equ 40000h ; automatically free the stream when it stop/ends
BASS_STREAM_RESTRATE equ 80000h ; restrict the download rate of internet file streams
BASS_STREAM_BLOCK equ 100000h ; download/play internet file stream in small blocks
BASS_STREAM_DECODE equ 200000h ; don't play the stream, only decode (BASS_ChannelGetData)
BASS_STREAM_STATUS equ 800000h ; give server status info (HTTP/ICY tags) in DOWNLOADPROC
BASS_MUSIC_FLOAT equ BASS_SAMPLE_FLOAT
BASS_MUSIC_MONO equ BASS_SAMPLE_MONO
BASS_MUSIC_LOOP equ BASS_SAMPLE_LOOP
BASS_MUSIC_3D equ BASS_SAMPLE_3D
BASS_MUSIC_FX equ BASS_SAMPLE_FX
BASS_MUSIC_AUTOFREE equ BASS_STREAM_AUTOFREE
BASS_MUSIC_DECODE equ BASS_STREAM_DECODE
BASS_MUSIC_PRESCAN equ BASS_STREAM_PRESCAN ; calculate playback length
BASS_MUSIC_CALCLEN equ BASS_MUSIC_PRESCAN
BASS_MUSIC_RAMP equ 200h ; normal ramping
BASS_MUSIC_RAMPS equ 400h ; sensitive ramping
BASS_MUSIC_SURROUND equ 800h ; surround sound
BASS_MUSIC_SURROUND2 equ 1000h ; surround sound (mode 2)
BASS_MUSIC_FT2MOD equ 2000h ; play .MOD as FastTracker 2 does
BASS_MUSIC_PT1MOD equ 4000h ; play .MOD as ProTracker 1 does
BASS_MUSIC_NONINTER equ 10000h ; non-interpolated sample mixing
BASS_MUSIC_SINCINTER equ 800000h ; sinc interpolated sample mixing
BASS_MUSIC_POSRESET equ 8000h ; stop all notes when moving position
BASS_MUSIC_POSRESETEX equ 400000h ; stop all notes and reset bmp/etc when moving position
BASS_MUSIC_STOPBACK equ 80000h ; stop the music on a backwards jump effect
BASS_MUSIC_NOSAMPLE equ 100000h ; don't load the samples
; Speaker assignment flags
BASS_SPEAKER_FRONT equ 1000000h ; front speakers
BASS_SPEAKER_REAR equ 2000000h ; rear/side speakers
BASS_SPEAKER_CENLFE equ 3000000h ; center & LFE speakers (5.1)
BASS_SPEAKER_REAR2 equ 4000000h ; rear center speakers (7.1)
BASS_SPEAKER_N MACRO n:REQ ; n'th pair of speakers (max 15)
EXITM <n SHL 24>
ENDM
BASS_SPEAKER_LEFT equ 10000000h ; modifier: left
BASS_SPEAKER_RIGHT equ 20000000h ; modifier: right
BASS_SPEAKER_FRONTLEFT equ BASS_SPEAKER_FRONT or BASS_SPEAKER_LEFT
BASS_SPEAKER_FRONTRIGHT equ BASS_SPEAKER_FRONT or BASS_SPEAKER_RIGHT
BASS_SPEAKER_REARLEFT equ BASS_SPEAKER_REAR or BASS_SPEAKER_LEFT
BASS_SPEAKER_REARRIGHT equ BASS_SPEAKER_REAR or BASS_SPEAKER_RIGHT
BASS_SPEAKER_CENTER equ BASS_SPEAKER_CENLFE or BASS_SPEAKER_LEFT
BASS_SPEAKER_LFE equ BASS_SPEAKER_CENLFE or BASS_SPEAKER_RIGHT
BASS_SPEAKER_REAR2LEFT equ BASS_SPEAKER_REAR2 or BASS_SPEAKER_LEFT
BASS_SPEAKER_REAR2RIGHT equ BASS_SPEAKER_REAR2 or BASS_SPEAKER_RIGHT
BASS_UNICODE equ 80000000h
BASS_RECORD_PAUSE equ 8000h ; start recording paused
; DX7 voice allocation & management flags
BASS_VAM_HARDWARE equ 1
BASS_VAM_SOFTWARE equ 2
BASS_VAM_TERM_TIME equ 4
BASS_VAM_TERM_DIST equ 8
BASS_VAM_TERM_PRIO equ 16
; Channel info structure
BASS_CHANNELINFO struct
freq DWORD ? ; default playback rate
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -