Hello,
Can i place IrrKlang 3d sounds with irrEdit and save them into the .irr level file ?
Thanks
Eviral
Place IrrKlang 3d sounds with irrEdit ???
Not that I know of. If you look, you'll notice there is a resources/sceneNode_sound.bmp in the irrEdit installation, and the irrKlang home page shows the irrEdit SceneGraph Explorer window with sounds in it. That leads me to believe that Niko has already got this working.
If Niko would add support for plug-ins this would be pretty easy. The irrEdit loading process would enumerate the dll files in the plugins folder, call LoadLibrary, and then GetProcAddress looking for a predefined named function. If the function is found it would invoke the function, perhaps passing a pointer to the scene manager, or maybe getting a pointer to a derived ISceneNodeFactory class. The code would then just register that scene node factory with the scene manager.
You would just have to write a DLL with a named function that created a ISceneNodeFactory capable of creating derived ISceneNode types. You could use the code I provided a while back to make sound emitter and listener scene nodes.
It is all possible, it just requires some time from the only person who has access to the source code. Either that or someone needs to write it up from scratch.
Travis
If Niko would add support for plug-ins this would be pretty easy. The irrEdit loading process would enumerate the dll files in the plugins folder, call LoadLibrary, and then GetProcAddress looking for a predefined named function. If the function is found it would invoke the function, perhaps passing a pointer to the scene manager, or maybe getting a pointer to a derived ISceneNodeFactory class. The code would then just register that scene node factory with the scene manager.
You would just have to write a DLL with a named function that created a ISceneNodeFactory capable of creating derived ISceneNode types. You could use the code I provided a while back to make sound emitter and listener scene nodes.
It is all possible, it just requires some time from the only person who has access to the source code. Either that or someone needs to write it up from scratch.
Travis
You could always do some trial and error and do it a different way. Load a static mesh into irrEdit, make it invisible, and give it a name you'll remember. Then when you're parsing the Scene nodes after loading them into your game, you could place the 3d sounds at the mesh's location.
Even an invisible billboard with no texture would work.
Of course, this is just a workaround until this gets fixed permanently.
Even an invisible billboard with no texture would work.
Of course, this is just a workaround until this gets fixed permanently.
I'm curious how you are providing this support. Obviously you don't want to add a direct dependency for IrrKlang on Irrlicht, so you can't really put the scene node in IrrKlang. And you are probably going to want to avoid adding a dependency on IrrKlang from Irrlicht also. I guess you could provide a plugin system that allows you to load a shared library to create derived scene node types and then use this from IrrEdit...
Travis
Travis