3d sound source scene node with OpenAL

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

is this node useful to you?

yes!
29
85%
no!?!
5
15%
 
Total votes: 34

hybrid

Linux

Post by hybrid »

buhatkj wrote:I would like to try and have this code work everyplace irrlicht does (ie. LINUX) so one of the other things I may improve in the future (in addition to added features and stuff) is to add a kdevelop project or makefile for linux and whatever code changes (if any) are needed to make it work there also. OpenAL supports OSS and ALSA so it should be possible....
I just tested the latest download and it works perfectly: Under LINUX!
You just have to adjust the capital letters of the include files since Linux distinguishes SoundDriver and sounddriver :lol:
Remove the include files special to windows (or better #ifdef it) and change the devices to OpenGL and arts (for KDE) or alsa or native (OSS).
So after all a very nice piece of software, looking forward to use it in my project.
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

left handed coordinates

Post by buhatkj »

etcaptor:
That is very intrigueing. In my example i suppose that is not evident because regardless the sound would seem to do a flyby, as it should, but I have not tried attaching it to the camera. I will have to check that out.

If what you suggest is true, could I fix it by simply inverting the Z coordinate I send to OpenAL?

like:

Code: Select all

void CSoundDriver::setPos(int id, core::vector3df p){
	float x; float y; float z;
	x=p.X;y=p.Y;z=p.Z;
        z = -1*z;//negate the z coordinate
	alSource3f(samples[id].alSource,AL_POSITION,x,y,z);
}
so i just multiply the z by negative one to flip it across the axis. Does that work or would it F up my transforms?
BTW, thanks for the heads up...
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

LINUX!!

Post by buhatkj »

Hybrid:
That's awesome :-)

I have been working on getting my machine set up to dual boot Win XP and Fedora core 4. Once I have Fedora all set up then I will have a good place to develop things for Linux :-)
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
hybrid

Moving Camera

Post by hybrid »

buhatkj wrote:and also useful would be maybe a movable camera, to which I could attach the "Listener".
Binding the listener to the camera works, just change the root node of the listener to cam. Note that you'll have to change the SoundListener update method for this since you want absolute position and rotation, not relative to the cam node. But then it works like a charme.
BTW: I replaced waterfall with a heli sound from Linux 'racer' game, this is definitely an experience 8)
Other
Posts: 85
Joined: Fri Dec 03, 2004 5:41 pm
Contact:

Post by Other »

afecelis wrote:works ok, but got a bit confused by not having any point of reference (as a 3d model) to orient myself in space.

Acki had already written a good example for openal some time ago. I made a modded version based on it here:(open al include and lib folders are linked externally)
http://www.danielpatton.com/afecelis/files/OpenAl.zip
cool about it. I searched in wiki irrforge and found no example for openal. Thanks afecelis, and u buhatski too - I am going to play with it ;-)
My Irrlicht&ODE-Project: http://www.lofing.de/myworld/
eviral
Posts: 91
Joined: Mon Oct 25, 2004 10:25 am

IUnknown and ambiguous symbol in VS2005

Post by eviral »

Hello,

i'm trying to use 3dsounddemo project (3dsounddemo.zip) with Visual Studio 2005 but i have an error about an ambiguous symbol Iunknown in sounddriver.h line 41 :

-------------
class CSoundDriver :
public IUnknown
{
public:

-----------------------

p:\Microsoft Visual Studio\PlatformSDK\Include\Unknwn.h(97) : error C2872: 'IUnknown' : ambiguous symbol
could be 'p:\Microsoft Visual Studio\PlatformSDK\Include\Unknwn.h(48) : irr::IUnknown IUnknown'
or 'd:\myproject\Irrlitch\irrlicht-0.12.0\source\Irrlicht\include\IUnknown.h(42) : irr::IUnknown'

I have tried to rename every iunknown in irrlicht and in my project with Irrunknown (i saw that in another post) but it doesn't work.

How can i simply solve that without changing anything in irrlicht sources ?


Thanks a lot !


I have tried to use :
class CSoundDriver : public irr::IUnknown
instead of
class CSoundDriver : public IUnknown

it compiles without errors but my project is crashing later...


Please help !!!

Thanks

Eviral
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

0.14.0

Post by buhatkj »

vs 2005 is supported newly in irrlicht 0.14.0
the 3d sound source demo is still currently packaged with irrlicht 0.12.0
thats probably the problem. the error there looks like vs 2005 cant compile the irr::IUnknown
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

@buhatkj: any updates for Irr0.14 or VS2005? :wink:

Edit: what happened with the "alu.h" header? It's no longer used in openal? The latest SDK doesn't have it and I got some apps that still require it. Or should we just link to "al.h"?
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

two things I think...

Post by buhatkj »

provided I can get OpenAL to work with VS2005, and provided I can get it to install correctly on my machine, There should be an update to my scene node with VS2005 support in the next week or so.

Afecelis: I think I remember reading in the release notes(not 100% sure...) for OpenAL 1.1 that they were consolidating the ALUT library into regular AL. SO yeh you are probably right, you just include al.h now.....
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

I tried creating the project clean in msvc2005 and got these errors:

Code: Select all

.\SoundDriver.cpp(39) : error C2664: 'alutLoadWAVFile' : cannot convert parameter 4 from 'unsigned int *' to 'ALsizei *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
3dSoundDemo.cpp
.\3dSoundDemo.cpp(48) : warning C4305: 'argument' : truncation from 'double' to 'irr::f32'
only that would be to be solved

ps. Final question: what are you using StdAfx.h for?
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

stdafx.h

Post by buhatkj »

afecelis wrote: ps. Final question: what are you using StdAfx.h for?
Didnt realize I was...which distribution of the 3d sound node are you using, the standalone demo, or a CVS checkout of fnord2?
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

standalone demo. There's an fnord version?
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

Fnord engine

Post by buhatkj »

Yeh the 3d sound demo has for a while now been integrated into the fnord2 engine workspace. There have also been some small improvements to it. the standalone demo is actually pretty old by comparison.
If you can, do an anonymous cvs checkout of module "Fnord-devel" from my CVS ("cvs.sourceforge.net" with cvsroot "cvsroot/fmorg"). This will get you all of my newest code :-)
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

vs2005

Post by buhatkj »

OK I installed VS2005, and tried simply running my project files through the upgrade wizard, and after correcting a few minor things I hit a wierd runtime exception where it seemed to be having issues with something in the STL vector class. I'm not sure what this is, but fixing it won't be fun or quick most likely. I have the windows platform SDK installed, so it's either some STL stuff that OpenAL was using, or that I'm using. I do use the STL a lot, so if it's having issues with that I won't be happy. We shall see....
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

hehehe, same thing here :wink:

It's good news to hear you took the chance of porting it to msvc2005. Plz let us know of updates :D
Post Reply