Hi!
How to install and initialize BASS on Linux:
a) copy the libbass.so from the download to /usr/local/lib/
b) inform your system about the new library: sudo ldconfig
c) use this code to initialize the BASS system:
procedure TForm1.FormCreate(Sender: TObject); begin if BASS_Init(-1, 44100, 0, @Handle, nil) then showmessage ('OK') else showMessage ('Error'); end;
Keep on rockin with BASS!
Winni
BOOL BASS_Init(
int device,
DWORD freq,
DWORD flags,
HWND win,
GUID *clsid
);
Where :
win The application's main window... 0 = the desktop window (use this for console applications). This is only needed when using DirectSound output.
Error was in opening post
unit1.pas(35,35) Error: Variable identifier expected
I showed the multi-platform code already, but here it is again.A stupid question: H is a variable on the stack. When Linux requires the address of this variable it will no longer be valid after your BassInit() has been left. Is this a problem for BASS? Does it require the handle only on this occasion?
procedure BassInit(H: HWND); begin {$IFDEF LINUX} BASS_Init(-1, 44100, 0, @H, nil); {$ELSE} BASS_Init(-1, 44100, 0, H, nil); /// !!! Bei Windows ohne Pointer, nur Handle {$ENDIF} end;
A stupid question: H is a variable on the stack. When Linux requires the address of this variable it will no longer be valid after your BassInit() has been left. Is this a problem for BASS? Does it require the handle only on this occasion?