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[] ) {
16 SGSampleQueue *squeue;
21 smgr = new SGSoundMgr;
24 smgr->init("OSS Default");
25 sgr = smgr->find("default", true);
26 smgr->set_volume(0.9);
33 string file = SRC_DIR"/jet.wav";
34 smgr->load(file, &data, &fmt, &len, &freq);
36 squeue = new SGSampleQueue( freq, fmt );
37 sgr->add(squeue, "queue");
39 squeue->add( data, len );
40 squeue->add( data, len );
42 printf("playing queue\n");
48 printf("source at lat,lon = (10,-10), listener at (9.99,-9.99)\n");
49 pos = SGGeod::fromDeg(9.99,-9.99);
50 squeue->set_position( SGVec3d::fromGeod(SGGeod::fromDeg(10,-10)) );
51 smgr->set_position( SGVec3d::fromGeod(pos), pos );
53 squeue->add( data, len );
54 squeue->add( data, len );
55 squeue->play( true ); // play looped
56 printf("playing queue\n");