IrrKlang and IrrEdit (.irr)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
NemoStein
Posts: 17
Joined: Mon Aug 11, 2008 12:04 am

IrrKlang and IrrEdit (.irr)

Post by NemoStein »

Hi...
I'm having trouble seting up my IrrLicht to work with .irr SceneNode and IrrKlang...

In my main.cpp, when I put the this code, it works:

Code: Select all

ISoundEngine* soundEngine = createIrrKlangDevice();
soundEngine->play2D("mysong.mp3");
I mean, I can hear the sound...

But, when I load a .irr scene with a irrKlangSceneNode to play my sound, the console prints this:

Code: Select all

Could not create scene node of unknown type: irrKlangSceneNode
And I hear no sound at all...

I'm I doing something wrong?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

create the IrrKlang device before calling loadScene. Otherwise loadScene won't know what an IrrKlangSceneNode is.
Image Image Image
NemoStein
Posts: 17
Joined: Mon Aug 11, 2008 12:04 am

Post by NemoStein »

My device is created before...

This is the top of my main:

Code: Select all

int main(){

	intro = createDevice(EDT_OPENGL, dimension2d<s32>(800, 600), 32, false, true, true);
	driver = intro->getVideoDriver();
	smgr = intro->getSceneManager();
	
	ISoundEngine* soundEngine = createIrrKlangDevice();

 	stringw str = "IrrKlang and IrrEdit test";
	intro->setWindowCaption(str.c_str());

	smgr->loadScene("../Sources/test.irr");
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I don't actually know anything about IrrKlang myself, are there any other functions you should call before playing a sound?
Image Image Image
NemoStein
Posts: 17
Joined: Mon Aug 11, 2008 12:04 am

Post by NemoStein »

There is the problem... I don't know... =|


Exemple:

Code: Select all

ISoundEngine* soundEngine = createIrrKlangDevice();
soundEngine->play2D("../Sources/mysong.mp3");
smgr->loadScene("../Sources/test.irr");
This way, the 1st sound (the one set direct into code) will play, but the 2nd (set inside .irr) won't...
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

And I don't know anything about IrrEdit, but...

What versions of IrrEdit are you using (i.e. what version saved out the .irr file), and what version of IrrKlang?

Oh, hang on, I've just noticed: the Ambierra forums are back up. Since Niko wrote IrrKlang and IrrEdit, you may have more luck asking over there.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
NemoStein
Posts: 17
Joined: Mon Aug 11, 2008 12:04 am

Post by NemoStein »

The versions:
IrrLicht 1.4.1
IrrEdit 1.4.1
IrrKlang 1.1.0

And thanks, Roger, I'll try there too...
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You need a scene node factory which supports irrKlang nodes. Otherwise the engine cannot deserialize that node. It's probably part of Irrklang, since irrEdit supports it already...
NemoStein
Posts: 17
Joined: Mon Aug 11, 2008 12:04 am

Post by NemoStein »

Factory?
Ahn... And how I'm supposed to do that? o.O*

Is there a class or function that can solve the problem?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Yeah that's what i was talking about, the need for a factory, but really i would think that IrrKlang would take care of creating one in its setup function... but maybe not...

I guess your code play2D doesn't care about an IrrKlangSceneNode so that will work fine... maybe search the IrrKlang docs for something about an ISceneNodeFactory implementation.
Image Image Image
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

I'm pretty sure it is covered in the irrKlang docs, but a quick search here turned up this thread.

Travis
Post Reply