//'--------------------------- BassVis API Module -----------------------------
//' BassVis API Module ADD-ON for Bass Audio Library
//' Copyright © 2007 BrewIdeas@Emil Weiss, All Rights Reserved
//'
//' Author(s) of this module: Emil Weiss
//'
//' Code was written in and formatted for 10pt Courier New
//'----------------------------------------------------------------------------
unit BassVis;
interface
uses
Windows;
type
HVIS = DWORD;
QWORD = Int64;
const
// BASS_SONIQUEVIS_CreateVis flags
BASS_VIS_NOINIT = 1;
// BASS_SONIQUEVIS_SetConfig flags
BASS_SONIQUEVIS_CONFIG_FFTAMP = 1;
BASS_SONIQUEVIS_CONFIG_FFT_SKIPCOUNT = 2;
// Skip count range is from 0 to 3 (because of limited FFT request size)
BASS_SONIQUEVIS_CONFIG_WAVE_SKIPCOUNT = 3;
// Skip count range is from 0 to (...) try it out, whenever Bass crashes or does not return enough sample data
BASS_SONIQUEVIS_CONFIG_SLOWFADE = 4;
// Dim light colors to less than half, then slowly fade them out
// BASS_WINAMP_SetConfig flags
BASS_WINAMPVIS_CONFIG_FFTAMP = 1;
// BASS_WMPVIS_SetConfig flags
BASS_WMPVIS_CONFIG_FFTAMP = 1;
// Bass FFT Amplification values
BASS_VIS_FFTAMP_NORMAL = 1;
BASS_VIS_FFTAMP_HIGH = 2;
BASS_VIS_FFTAMP_HIGHER = 3;
BASS_VIS_FFTAMP_HIGHEST = 4;
// BASS_VIS_FindPlugin flags
BASS_VIS_FIND_SONIQUE = 1;
BASS_VIS_FIND_WINAMP = 2;
BASS_VIS_FIND_RECURSIVE = 4;
// return value type
BASS_VIS_FIND_COMMALIST = 8;
// Delphi's comma list style (item1,item2,"item 3",item4,"item with space")
// the list ends with single NULL character
function BASS_SONIQUEVIS_CreateVis(f, visconfig:PChar; flags, w, h: DWORD):HVIS;
stdcall;
external '
bass_vis.dll';
function BASS_SONIQUEVIS_Render(
handle: HVIS; channel: DWORD; canvas: HDC): Boolean;
stdcall;
external '
bass_vis.dll';
function BASS_SONIQUEVIS_Render2(
handle: HVIS; data, fft: Pointer; canvas: HDC; flags, pos: DWORD): Boolean;
stdcall;
external '
bass_vis.dll';
function BASS_SONIQUEVIS_Free(
handle: HVIS): Boolean;
stdcall;
external '
bass_vis.dll';
function BASS_SONIQUEVIS_GetName(
handle: HVIS): PChar;
stdcall;
external '
bass_vis.dll';
function BASS_SONIQUEVIS_Clicked(
handle: HVIS; x, y: DWORD): Boolean;
stdcall;
external '
bass_vis.dll';
function BASS_SONIQUEVIS_Resize(
handle: HVIS; nw, nh: DWORD): Boolean;
stdcall;
external '
bass_vis.dll';
function BASS_SONIQUEVIS_GetConfig(option: DWORD): DWORD;
stdcall;
external '
bass_vis.dll';
function BASS_SONIQUEVIS_SetFullScreen(
handle: HVIS; SourceHandle: DWORD; DestHandle: DWORD; SourceLeft: DWORD; SourceTop: DWORD; SourceWidth: DWORD; SourceHeight: DWORD; FullScreen: BOOL; FullScreeWidth: DWORD; FullScreenHeight: DWORD): boolean;
stdcall;
external '
bass_vis.dll';
procedure BASS_SONIQUEVIS_CreateFakeSoniqueWnd;
stdcall;
external '
bass_vis.dll';
procedure BASS_SONIQUEVIS_DestroyFakeSoniqueWnd;
stdcall;
external '
bass_vis.dll';
procedure BASS_SONIQUEVIS_SetConfig(option, Value: DWORD);
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_ExecuteVis(PluginName: PChar; moduleNum: integer; ownHdc: boolean; ownHdcW2: boolean): HVIS;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_RenderStream(StreamHandle: DWORD): boolean;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_Free(
handle: HVIS): Boolean;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_GetModuleName(
handle: HVIS; VismodNum: integer): PChar;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_GetName(
handle: HVIS): PChar;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_Config(
handle: HVIS; VismodNum: Integer): Boolean;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_SetChanInfo(
handle: HVIS; title: PChar; filename: PChar; pos, len: DWORD; PListPos: integer; PLLength: integer): Boolean;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_SetChanMPEGInfo(
handle: HVIS; SampleRate, BitRate: integer; Duration: DWORD; Channels: integer): boolean;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_GetNumModules(PluginName: PChar):integer;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_GetHandle(PluginName: PChar): HVIS;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_StartRecord(SampleRate: DWORD; Channels: Integer): boolean;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_GetAmpHwnd: DWORD;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_GetGenHwnd: DWORD;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_Init(AppHandle: DWORD; WinHandle: DWORD): boolean;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_GetConfig(option: DWORD): DWORD;
stdcall;
external '
bass_vis.dll';
procedure BASS_WINAMPVIS_SetConfig(option, Value: DWORD);
stdcall;
external '
bass_vis.dll';
procedure BASS_WINAMPVIS_SetGenHwndParent(hWindow : DWORD; hContainer: DWORD; x, y, w, h: Integer);
stdcall;
external '
bass_vis.dll';
procedure BASS_WINAMPVIS_RecordFree;
stdcall;
external '
bass_vis.dll';
procedure BASS_WINAMPVIS_Quit;
stdcall;
external '
bass_vis.dll';
procedure BASS_WINAMPVIS_Play(
handle: DWORD);
stdcall;
external '
bass_vis.dll';
procedure BASS_WINAMPVIS_Pause(
handle: DWORD);
stdcall;
external '
bass_vis.dll';
procedure BASS_WINAMPVIS_Stop(
handle: DWORD);
stdcall;
external '
bass_vis.dll';
procedure BASS_WINAMPVIS_SetPlaylistPos(
handle: DWORD; PlPos: Integer);
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_GetPlaylistPos(
handle: DWORD):integer;
stdcall;
external '
bass_vis.dll';
function BASS_WINAMPVIS_IsPlaying(
handle: DWORD):integer;
stdcall;
external '
bass_vis.dll';
function BASS_WMPVIS_Init(AppHandle: DWORD; WinHandle: DWORD): boolean;
stdcall;
external '
bass_vis.dll';
function BASS_WMPVIS_ExecuteVis(PlgListIndex: Integer; PresetIndex: Integer; VisWinhandle: DWORD; Left, Top, width, heigth: Integer): HVIS;
stdcall;
external '
bass_vis.dll';
function BASS_WMPVIS_GetPresetTitle(PlgListIndex: Integer; NumPresets: Integer): PChar;
stdcall;
external '
bass_vis.dll';
function BASS_WMPVIS_GetPresetCount(PlgListIndex: Integer):integer;
stdcall;
external '
bass_vis.dll';
function BASS_WMPVIS_GetPluginDescription(): PChar;
stdcall;
external '
bass_vis.dll';
function BASS_WMPVIS_Free(
handle: HVIS): boolean;
stdcall;
external '
bass_vis.dll';
function BASS_WMPVIS_RenderStream(StreamHandle: DWORD): boolean;
stdcall;
external '
bass_vis.dll';
function BASS_WMPVIS_FindPlugins(): PChar;
stdcall;
external '
bass_vis.dll';
function BASS_WMPVIS_GetConfig(option: DWORD): DWORD;
stdcall;
external '
bass_vis.dll';
function BASS_WMPVIS_SetFullScreen(SourceHandle: DWORD; DestHandle: DWORD; SourceLeft: DWORD; SourceTop: DWORD; SourceWidth: DWORD; SourceHeight: DWORD; FullScreen: BOOL; FullScreeWidth: DWORD; FullScreenHeight: DWORD): boolean;
stdcall;
external '
bass_vis.dll';
procedure BASS_WMPVIS_Resize(SourceWidth: DWORD; SourceHeight: DWORD);
stdcall;
external '
bass_vis.dll';
procedure BASS_WMPVIS_SetCurrentPreset(PresetIndex: Integer);
stdcall;
external '
bass_vis.dll';
procedure BASS_WMPVIS_Config(hwndOwner: DWORD);
stdcall;
external '
bass_vis.dll';
procedure BASS_WMPVIS_SetConfig(option, Value: DWORD);
stdcall;
external '
bass_vis.dll';
procedure BASS_WMPVIS_SetMediaInfo(Channels: integer; SampleRate: integer; Title:
string);
stdcall;
external '
bass_vis.dll';
function BASS_WMPVIS_StartRecord(SampleRate: DWORD; Channels: Integer): boolean;
stdcall;
external '
bass_vis.dll';
procedure BASS_WMPVIS_RecordFree;
stdcall;
external '
bass_vis.dll';
procedure BASS_WMPVIS_Play;
stdcall;
external '
bass_vis.dll';
procedure BASS_WMPVIS_Pause;
stdcall;
external '
bass_vis.dll';
procedure BASS_WMPVIS_Stop;
stdcall;
external '
bass_vis.dll';
procedure BASS_WMPVIS_Quit;
stdcall;
external '
bass_vis.dll';
function BASS_VIS_FindPlugins(vispath: PChar; flags: DWORD): PChar;
stdcall;
external '
bass_vis.dll';
implementation
end.