wp-xyz / Oscilloscope

3 stars 3 forks source link

Compiling under Linux #1

Closed fredvs closed 3 years ago

fredvs commented 3 years ago

Hello.

There was some problem to compile+run it under Linux.

obassdatacollector.pas(254,56) Error: Incompatible type for arg no. 4: Got "HWND", expected "Pointer" bass.pas(791,10) Hint: Found declaration: BASS_Init(LongInt;LongWord;LongWord;Pointer;Pointer):LongBool; CDecl;

This point to the "Handle" variable:

 if (not BASS_RecordInit(FDevice)) or
         (not BASS_Init(FDevice, ASampleRate, flags, Handle, nil)) then

It seems that Handle is HWND in LCL Linux, strange.

So I did change in bass.pas ( win: HWND)

function BASS_Init(device: LongInt; freq, flags: DWORD; win: HWND; clsid: Pointer): BOOL; cdecl; external bassdll;

With this it compiles ok and runs ok.

By the way WOW and congratulations.

Fred

fredvs commented 3 years ago

On Linux 64 bit, using the build-in microphone input.

oscilloscope_linux64_bass24

fredvs commented 3 years ago

Perfect.

Thanks.