Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hello, I search to implement Irrklang in Irrlicht. I have find the irrKlang scene node for Irrlicht 1.5 and use them with Irrlicht 1.7.2. At first look the code is correct. But I have a problem : when I play a sound is the render loop it crash (in EventReceiver). And I don't see a source listener and emitter ? I missed something ? Thanks, RVM |
||||
|
Hm, some more details about the crash maybe? |
||||
|
Hello, I use this function to play a song :
And in my render loop : if(EventReceiver.IsKeyDown(irr::KEY_KEY_Z)) Here is my complete class : http://pastebin.com/rJ071NMR (h) http://pastebin.com/p3V0LaNr (cpp) First I was thinking it was a incorrect file but no... RVM |
||||
|
By shortly taking a look at this, it looks ok for me. Where exactly does it crash in your event receiver, and why? Are you for example sure that the Player pointer is ok? |
||||
|
Normally the pointer is ok. Here is my render loop :
And it crash at line : Player->Play_Sound('T'); If I comment the line, I can move my Player. I am not a pro in debugging, but when I put a break point at this line, I have a SIGSEGV error... I will a learn a bit more about debugging. Just a question, Irrklang use a thread for playing a song ? RVM |
||||
|
hello, I have the same problem. CIrrKlangSceneNode::CIrrKlangSceneNode* soundNode = new CIrrKlangSceneNode::CIrrKlangSceneNode(soundEngine, smgr->getRootSceneNode(), smgr, 666); //soundNode->setSoundFilename soundNode->setSoundFileName("media/fallout.wav"); soundNode->setMinMaxSoundDistance(30.0f); // influences the distance where the sound can be heard soundNode->setRandomMode(1000, 5000); // plays sound multiple times with random interval // other modes would be: // soundNode->setLoopingStreamMode() // or // soundNode->setPlayOnceMode(); soundNode->drop(); When the code: soundNode->setSoundFileName("media/fallout.wav"); is commented out. all works fine. //soundNode->setSoundFileName("media/fallout.wav"); So what is the bug? Cheers Unknown |
|