4 #define sleep(x) Sleep(x*1000)
9 #include <simgear/debug/logstream.hxx>
10 #include <simgear/misc/sg_path.hxx>
12 #include "soundmgr_openal.hxx"
15 int main( int argc, char *argv[] ) {
19 smgr = new SGSoundMgr;
23 sgr = smgr->find("default", true);
24 smgr->set_volume(0.9);
27 printf("default position and orientation\n");
28 SGSoundSample *sample1 = new SGSoundSample( SRC_DIR, "jet.wav" );
29 sample1->set_volume(1.0);
30 sample1->set_pitch(1.0);
31 sample1->play_looped();
32 sgr->add(sample1, "sound1");
34 printf("playing sample\n");
40 printf("source at lat,lon = (10,-10), listener at (9.99,-9.99)\n");
41 sample1->set_position( SGVec3d::fromGeod(SGGeod::fromDeg(10,-10)) );
42 smgr->set_position( SGVec3d::fromGeod(SGGeod::fromDeg(9.99,-9.99)) );
43 sample1->play_looped();
45 printf("playing sample\n");
51 sgr->remove("sound1");