//Yes, BassBox has a plugin interface, and you can find the full history of the project there:
//http://www.jose.it-berater.org/smfforum/index.php?topic=1364.0
//Each of the BassBox plugin in an independant plain
Win32 DLL that does use one single exported function,
//that works like a standard
SDK Window Proc.
'// The main exported plugin's function would be bbProc, like this:
FUNCTION BBProc ALIAS "BBProc" (BYREF BBP AS BBPLUGIN) EXPORT AS LONG
LOCAL nRet AS LONG
nRet = %BBP_SUCCESS
SELECT CASE LONG BBP.Msg
CASE %BBP_RENDER
'// Draw the scene using BBP.LeftPeak and BBP.RightPeak
CASE %BBP_CREATE
'// Retrieve plugin details
BBP.Title = "My BB plugin"
BBP.Author = "My Name"
BBP.Version = MAKDWD(1, 0) '// Version 1.0"
BBP.RenderTo = %BBP_OPENGL '// or %BBP_GDIPLUS, or %BBP_DIRECTX
CASE %BBP_INIT
'// Do your code initialisation there
CASE %BBP_SIZE
'// The size of the view port has changed.
CASE %BBP_KEYBOARD
'//
Handle all Windows keyboard messages there
Msg = BBP.WinMsg
wParam = BBP.wParam
lParam = BBP.lParam
CASE %BBP_MOUSE
'//
Handle all Windows mouse messages there
Msg = BBP.WinMsg
wParam = BBP.wParam
lParam = BBP.lParam
CASE %BBP_DESTROY
'// Free up your resources there
CASE ELSE
nRet = %BBP_ERROR
END SELECT
FUNCTION = nRet
END FUNCTION
//And to communicate with the plugin.dll, the main EXE uses this structure type:
TYPE BBPLUGIN '// 256 bytes
Msg AS LONG '// The plugin's message (see above constant list).
ParentWindow AS LONG '// The parent window
handle.
DC AS LONG '// The parent window
DC (while in play mode).
RC AS LONG '// The parent
OpenGL RC (while in play mode).
Lpeak AS WORD '// The left audio channel peak value (while in play mode).
Rpeak AS WORD '// The right audio channel peak value (while in play mode).
Title AS ASCIIZ * 32 '// Plugin's name or title.
Author AS ASCIIZ * 64 '// Plugin's author name.
Version AS DWORD '// LOWRD major, HIWRD minor.
RenderTo AS LONG '// %BBP_GDIPLUS, %BBP_OPENGL, %BBP_DIRECTX.
BackARGB AS LONG '// Default ARGB color background.
FFTdata AS DWORD '// DWORD pointer to the FFT() AS SINGLE array.
FFTsize AS WORD '// Size of the FFT array.
WinMsg AS LONG '// True Windows message.
wParam AS LONG '// wParam
lParam AS LONG '// lParam
WIMdata AS DWORD '// DWORD pointer to the wave MM_WIM_DATA.
MediaLength AS DWORD '// Media length.
MediaPos AS DWORD '// Media pos.
Reserved AS ASCIIZ * 98 '// Reserved for future extension.
END TYPE
//The name of the procedure being used in the main EXE to communicate with the active plugin is BBP_Plugin (BYREF BBP AS BBBPLUGIN)
//In BassBox, all the plugins are closely tied to the BassChannelGetLevel
API to perform real time audio visualization.