Jump to content
Tuts 4 You

Bassmod as LIB


Ufo-Pu55y

Recommended Posts

  • 1 year later...
Posted

Hey guys, I know this thread is really old.

But I really need to ask: how about vb or vb .NET? I definetly could need a static bass playback :D

Or is any sound engine out there which is full managed code and is able to play chips and ogg´s? My dream is to

play sounds (ogg,xm,mod,it,s3m) in vb .net without any local extraction ... And by the way, I would also pray for a

v2m playback engine for vb .net !!!

Greetz

  • 3 weeks later...
Posted

Hey guys, I know this thread is really old.

But I really need to ask: how about vb or vb .NET? I definetly could need a static bass playback :D

Or is any sound engine out there which is full managed code and is able to play chips and ogg´s? My dream is to

play sounds (ogg,xm,mod,it,s3m) in vb .net without any local extraction ... And by the way, I would also pray for a

v2m playback engine for vb .net !!!

Greetz

V2M would require a lot of work for managed ports.

XM/MOD/IT/S3M - completely feasible.

  • 2 years later...
Posted

Salut,


Sorry for pumping an old thread..


But is any body succeeded converting the LIB to be used with delphi?


or is there another way to link the dll without extracting it to a temp dir?


I did alot of research but no luck!


Posted (edited)

In theory, the required steps would be:


  • take static lib from this topic;
  • extract coff-format obj files using objconv.exe by Agner Fog;
  • convert coff obj files to omf obj files using the same objconv.exe;
  • make those OMF files usable by Delphi using omf2d.exe by EliCZ;
  • make a Delphi unit that uses those obj file and defines Bassmod constants and function prototypes;
  • profit! :)

In reality, it's usually simpler to drop DLL in temp or use some sort of RunPE to load DLL from memory..


 


EDIT: typo spotted by Sn!per X. Sorry, it's a late evening here, I'm tired.. ;)


Edited by kao
  • Like 1
Posted

Well, thanks Kao for the quick response.


i tried to download the tools you mentioned above


but i stucked at step 4:


omd2d.exe by EliCZ

 



a google search went empty!!


so any download link will be appreciated.


Posted

Hey guys, I know this thread is really old.

But I really need to ask: how about vb or vb .NET? I definetly could need a static bass playback biggrin.png

Or is any sound engine out there which is full managed code and is able to play chips and ogg´s? My dream is to

play sounds (ogg,xm,mod,it,s3m) in vb .net without any local extraction ... And by the way, I would also pray for a

v2m playback engine for vb .net !!!

Greetz

 

https://forum.tuts4you.com/topic/27912-play-xm-chips-without-additional-dlls-from-c/

Posted

after converting i stucked at:


[Error] Unit1.pas(27): Bad object file format: 'C:\1000\4- Delphi Bassmod obj Test\bassmod_exp_.obj'
[Error] Unit1.pas(29): Unsatisfied forward or external declaration..

 

 

what i am doing wrong?

 

Bassmod_Delphi.rar

Posted

As you can see for yourself - getting obj files work in Delphi is not an easy process. You didn't do anything wrong, it just involves a lot of hacking around lots of issues.


 


As for #1 - IIRC you don't need bassmod_exp_.obj file at all, all the required functionality was in bassmod.obj. So, just get rid of that bassmod_exp_.obj.


As for #2 - Most likely obj file references some function that Delphi doesn't know about. Something like _initterm comes to mind, but I can't really tell w/o installing Delphi and trying it out. 

  • Like 1
Posted

What's about prototypes? how to declare'em?


for example:


when the dll linked: 



function BASSMOD_Init(device: Integer; freq, flags: DWORD): BOOL; stdcall; external 'bassmod.dll';


 


 



but when bassmod_.obj linked: 


function BASSMOD_Init(device: Integer; freq, flags: DWORD): BOOL; stdcall; external';

 



declaring the function in this way gives me:


[Error] Unit1.pas(149): Bad object file format: 'C:\1000\4- Delphi Bassmod obj Test\bassmod_.obj'


 


i am getting  :pinch:  


 


  • 2 weeks later...
Posted

excellent job kao,  


for a while i thought its impossible to convert that thing to a valid delphi obj file  :scratch: :D


so many thanks for your help.


  • 5 years later...
Posted (edited)

Can someone please unpack the latest bass.dll for me? I would like to convert it to use in c++.

I've found an OEP/dumped/reconstructed but maybe I do something wrong because the dll is not working and Dll2Lib crashes :(

 

I also tried to use old v2.0 and bassmod.lib provided in this topic, but the linker says there are mismatches in lib's export...

 

Edit: still looking for a smaller solution, but for now I used code of MemoryModule from github to load bass.dll directly from resources

Edited by Roentgen

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...