Created ATL/COM wrapper for irrKlang

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
David Winter
Posts: 5
Joined: Fri Apr 13, 2007 5:27 pm
Location: Vancouver, BC, Canada
Contact:

Created ATL/COM wrapper for irrKlang

Post by David Winter »

Hello all

This is my first post. :shock:

I just wanted to let people know that over the past evening or so I created a (very simple) ATL/COM wrapper for the irrKlang sound dll.

It's designed to work with VB6 or any other com friendly language. Yes, I realize that some here have great distane for VB6 (based on some threads I read) but it is still the single most popular programming language in the world, is fantastic for all sorts of game development (with the right graphics engine in use) and is simply just better than the VB.not version MS is thrusting upon people.

Besides, sound is sound is sound and can be used for more than just games.

But I digress...

This is a very simple wrapper because I built it for my own needs of initalizing the engine and playing sounds with the ability to loop or not, and change volume. My needs don't really go beyond that.

So, as irrKlang is open source it's only fair that I make the VB6 friendly wrapper open source as well.

If people wish, they can add the other engine features I don't bother to wrap. Engine error handling and variuos other niceties probably could be added to (I built the thing and know how it works so didn't bother with too much error handling). The code comments are fairly sparse too because the implementation is so simple. :oops:

So who do I send the code to?

Noticed that irrKlang 7.0 was just released so I should mention this is a wrapper for 6.0.. I have no idea how easy the migration would be.

Oh.. and if possible, could those are developing the core code change the IUnknown class object to another name? When you create a new ATL project microsoft adds default classes that also use the IUnknown name and this causes nameing conflicts. I worked around the problem by simply not using namespaces but that's probably not the best solution.

thanks to those that created the core code.. it's saved me a huge amount of work.
David
HLFat
Posts: 71
Joined: Sun Sep 24, 2006 6:55 pm
Location: USA

Post by HLFat »

So who do I send the code to?
How about using a free file host like Rapidshare?

Maybe I can adapt it for use with Digital Mars or Borland.

Or, if Niko does the static lib, I may be able to convert that.
David Winter
Posts: 5
Joined: Fri Apr 13, 2007 5:27 pm
Location: Vancouver, BC, Canada
Contact:

Post by David Winter »

I thought they had to be hosted here? hmm maybe not.


Granted, my version of Borland Builder is circa 1995, but I have never been able to successfully use a COM object with it. Maybe that's better now with versions that are not 12 years old.

Builder was/is a fantastic tool.. it was the tool that came closest to getting me to move away from VB. But Borland support was lacking, and using my existing code base would not have been possible.
HLFat
Posts: 71
Joined: Sun Sep 24, 2006 6:55 pm
Location: USA

Post by HLFat »

Thanks for the quick responce.

After a little more research, I realize this probably won't work for me.

But I am still curious as to how you did it.
Last edited by HLFat on Mon Apr 16, 2007 7:17 pm, edited 1 time in total.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Hey, that's cool. If you like, I can publish it on www.ambiera.com for you, just include some precise license for your code.
David Winter
Posts: 5
Joined: Fri Apr 13, 2007 5:27 pm
Location: Vancouver, BC, Canada
Contact:

Post by David Winter »

That would be great.

I should probably update it to irrKlang 7 though as, based on the release notes you sent out, it doesn't look like version 6 is releasing the resources after the sound has finished playing (which would cause memory leaks when applied to my game).

So let me do that, add some code comments to the VB app, and I'll send it to you.

thanks.
Post Reply