Hi, I am working with irrlicht just few days I and now I have a problem
- can't find out how to laod sound into scene.
No tutorial, no example, no result on forum search, no ISoundSceneNode wtf? Maybe I am just blind
I know with IRRLichtEdit ther's no problem to add sound but for few reasons I don't use this editor so I have to add everything via code
#include <iostream>
#include <irrKlang.h>
using namespace irr;
using namespace audio;
int main(int argc, const char** argv)
{
// start the sound engine with default parameters
ISoundEngine* engine = createIrrKlangDevice();
if (!engine)
return 0; // error starting up the engine
// play some sound stream, looped
engine->play2D("somefile.mp3", true);
char i = 0;
std::cin >> i; // wait for user to press some key
engine->drop(); // delete engine
return 0;
}
irrklang is the sound library and is a brother of irrlicht well sort of Used in the xbox 360 for sound.