Page 1 of 1

irrkalng

Posted: Thu Aug 09, 2007 2:28 am
by Cear
Hey guys, im an Irrlicht user jsut now starting to implement sound. my goal is simple. i want to play an MP3 in my first person rpg. I want the music to be the same no matter where he goes. i have this code in my project and it compiles fine. the game also loads with no problems but i dont see why the song doesnot play



//______________________________________Music__________________________

ISoundEngine* engine = createIrrKlangDevice();
audio::ISound* music = engine->play3D("everyone.mp3",
core::vector3df(6000,1300,9200), true, false, true);

ive tried many thing like setting the volume to 1.0f and making max distance 200000 and min distance 1

nuthin plays the song
thats basically it. i dont hear any sounds at all. do i need to attack it to the camera? if so how. thakns people.

Posted: Thu Aug 09, 2007 6:06 am
by Masterhawk
I didn't use irrKlang before....but shouldn't you use engine->play2D("bla.mp3",true); if it's not position sensitive ?

That's the way it's shown on http://ambiera.com/irrklang/index.html

Don't know if it works..just a guess

Posted: Thu Aug 09, 2007 6:48 am
by Cear
oop sorry. i fixed it.
i forgot to set the listener position :(


engine->setListenerPosition(core::vector3df(6000,1300,9200), core::vector3df(0,0,1));