javascript:emoticon(':(')
Sad
Hello,
as an Irrlicht beginner I make first expierence with this wonderful game engine, which impresses me more and more. Now I work on 3D sound in my project and want to set an alien_engine sound on a certain position in my level. Therefore I used the following code snippet:
------------------------------------------------------------------------
ISoundEngine* engine = createIrrKlangDevice();
if (!engine)
return 0;
audio::ISound* music = engine->play3D("./data/alien_engine.wav", core::vector3df(120,50,300),true,false,true);
if(music)
music->setMinDistance(5.0f);
music->setVolume(0.2f);
if(music)
music->drop();
--------------------------------------------------------------------------
Unfortunately I got only a 2D sound, meaning I hear the sound right after starting my level on any position with constant volume.
I work with Irrklang 04, because 05 gives always an error message and tried this in different variations. There is certainly something missing to get this effect, but I cannot find it. Is there anybody who can help me ? Thanks a lot for your support !!
RobbyRob
3D Sound in a level
is it stereo?
is there a chance your wav file is in stereo? stereo wav files in play3d behave differently than you would expect.
lonesock
Piranha are people too.
Piranha are people too.
What error message does irrKlang 0.5 print exactly? Would be nice to know so I can fix it.
But btw: irrKlang can also play stereo sounds in 3d, not a problem. Maybe you forgot to let the sound engine know where you are as listener in 3d space? You need to call setListenerPosition() for this (http://www.ambiera.com/irrklang/docu/cl ... e.html#a16). Somehow a paragraph in the 3d sound tutorial, disappeared, I'm going to fix this soon.
But btw: irrKlang can also play stereo sounds in 3d, not a problem. Maybe you forgot to let the sound engine know where you are as listener in 3d space? You need to call setListenerPosition() for this (http://www.ambiera.com/irrklang/docu/cl ... e.html#a16). Somehow a paragraph in the 3d sound tutorial, disappeared, I'm going to fix this soon.