Actually, there is no audio function in IrrLicht. But i suggest you to use BASS library, just google it out.
Anyway, there's a stub:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#include <irrlicht.h>
using namespace irr;
IrrlichtDevice* Device; //Default Irrlicht Game Window
scene::ISceneManager* smgr;
video::IVideoDriver* Driver;
gui::IGUIEnvironment* guienv;
int main(int argc, char[] argv)
{
Device = createDevice(video::EDT_DIRECT3D9,core::dimension2di(640,480), 32, false); //1. Driver, can be DIRECT3D9, DIRECT3D8, OPENGL, NULL, SOFTWARE... 2. Resolution 3. Bits 4. Fullscreen
Driver = Device->getVideoDriver();
smgr = Device->getSceneManager();
guienv = Device->getGUIEnvironment();
while(Device->run())
{
Driver->beginScene(true,true,255,255,255,255);
smgr->drawAll();
guienv->drawAll();
Driver->endScene();
}
Device->drop();
return 1;
}
|
Device is the pointer to the Main Irrlicht Device, there can be more than one.
Driver is the pointer to the video driver.
smgr is the pointer to the Scene Manager, use this to add models, etc. etc....
guienv is the pointer to the GUI Manager, use this to add buttons, listboxs...
*pointer* -> drop()
this must be called when you finish to use the pointer.
ONLY if the pointer begins with create* , like createDevice.
smgr, Driver, guienv MUST NOT BE DROPPED, as they are a getSceneManager, getVideoDriver, getGUIEnvironment pointers.
These are the basics.
There might be something wrong, it's just a stub i wrote here. anyway, you can check IrrLicht's tutorials, they're included with the Irrlicht Engine.