BASS 2.4.8.1 Header

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

BASS 2.4.8.1 Header

Post by MOD »

I've translated the latest header of BASS 2.4.8.1

@sir_mud: would you upload it to the fb-header-project. Would be great to have new header with fbc 0.24.
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Re: BASS 2.4.8.1 Header

Post by sir_mud »

Thanks, it's in git now. I generated a def from the included dll since there wasn't one included.
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

Re: BASS 2.4.8.1 Header

Post by MOD »

Sorry, I forgot about the def file. Thank you.
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

Re: BASS 2.4.8.1 Header

Post by MOD »

Update:
-new example with Creative Commons Attribution-Noncommercial-Share Alike 3.0 License example sounds

They could be included as examples for the fbc-download.
(Same link - see first post)

sir_mud: the version you've uploaded differs from my version. theres at least one problem in line 420:

Code: Select all

type RECORDPROC as cdecl function (byval as HRECORD, byval as const any ptr, byval as DWORD, byval as any ptr) as BOOL
You've mixed 'cdecl' and 'function'.

'extern "C"' seems wrong as well.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: BASS 2.4.8.1 Header

Post by Lachie Dazdarian »

When I try to compile a program that uses BASS among other things, I get duplicate definitions errors on these two lines:

Code: Select all

#define MAKEWORD(a,b) Cast(WORD, ((a) And &hFF) Or ((b) Shl 8))
#define MAKELONG(a,b) Cast(DWORD, ((a) And &hFFFF) Or ((b) Shl 16))
Any ideas?
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

Re: BASS 2.4.8.1 Header

Post by MOD »

And why this is a bass header fault? :P
Seems like windows headers also use these definitions in windef.bi.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: BASS 2.4.8.1 Header

Post by Lachie Dazdarian »

I'm not saying it's anyone fault, just trying to compile a program in Windows, and the compilation halted in bass.bi.
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

Re: BASS 2.4.8.1 Header

Post by MOD »

If you swap the include lines, it will stop on windef.bi.
You could delete the lines from bass.bi because you don't need them for every bass usage.
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: BASS 2.4.8.1 Header

Post by TJF »

@Lachie Dazdarian:

Consider to use a NAMESPACE-block around one of the headers.
Gonzo
Posts: 722
Joined: Dec 11, 2005 22:46

Re: BASS 2.4.8.1 Header

Post by Gonzo »

thats why we have #ifdef #endif =)
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

Re: BASS 2.4.8.1 Header

Post by MOD »

The current compiler 0.24 comes with mixed up files as I see. I don't know where that .dll.a comes from and the header uses extern blocks which are also a problem.
I recommend to use my files from the link in the first post.
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: BASS 2.4.8.1 Header

Post by dkl »

I fixed FB's BASS .def file, so the import library should be correct in the next FB release.

Checking the bass.dll and the original bass.h header, it exports stdcall functions without @N suffix. FB's bass.bi header was changed to use Extern "windows-ms" to match this, however the import library was not adjusted accordingly. In the past the bass.bi header used @N suffixes, and the import library provided the symbols with @N too, and then linked them up with the corresponding symbols without @N from the bass.dll, by using dlltool's --kill-at switch. Now that the header itself uses the correct mangling (no @N suffix), the import library doesn't need to do any tricks anymore.

By the way, the import library still seems to be required: I tried letting ld link against the bass.dll directly, but it failed with a "file format not recognized" error. This worked with other DLLs for me in the past, but apparently it doesn't like the bass.dll for some reason.
Post Reply