Jump to content
Tuts 4 You
Sign in to follow this  
Ufo-Pu55y

Bassmod as LIB

Recommended Posts

Freefall63

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

Share this post


Link to post
mudlord

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.

Share this post


Link to post
Sn!per X

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!


Share this post


Link to post
kao

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 (see edit history)
  • Like 1

Share this post


Link to post
Sn!per X

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.


Share this post


Link to post
Kurapica

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/

Share this post


Link to post
Sn!per X

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

Share this post


Link to post
kao

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

Share this post


Link to post
Sn!per X

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:  


 


Share this post


Link to post
Sn!per X

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.


Share this post


Link to post
ghost-dz

Good job kao.


Share this post


Link to post

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
Sign in to follow this  
×
×
  • Create New...