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);
25 smgr->set_position( SGVec3d::fromGeod(SGGeod::fromDeg(0,0)) );
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 sample1\n");
37 SGSoundSample *sample2 = new SGSoundSample( SRC_DIR, "jet.wav" );
38 sample2->set_volume(0.5);
39 sample2->set_pitch(0.4);
40 sample2->play_looped();
41 sgr->add(sample2, "sound2");
43 printf("playing sample2\n");
46 SGSoundSample *sample3 = new SGSoundSample( SRC_DIR, "jet.wav" );
47 sample3->set_volume(0.5);
48 sample3->set_pitch(0.8);
49 sample3->play_looped();
50 sgr->add(sample3, "sound3");
52 printf("playing sample3\n");
55 SGSoundSample *sample4 = new SGSoundSample( SRC_DIR, "jet.wav" );
56 sample4->set_volume(0.5);
57 sample4->set_pitch(1.2);
58 sample4->play_looped();
59 sgr->add(sample4, "sound4");
61 printf("playing sample4\n");
64 SGSoundSample *sample5 = new SGSoundSample( SRC_DIR, "jet.wav" );
65 sample5->set_volume(0.5);
66 sample5->set_pitch(1.6);
67 sample5->play_looped();
68 sgr->add(sample5, "sound5");
70 printf("playing sample5\n");
73 SGSoundSample *sample6 = new SGSoundSample( SRC_DIR, "jet.wav" );
74 sample6->set_volume(0.5);
75 sample6->set_pitch(2.0);
76 sample6->play_looped();
77 sgr->add(sample6, "sound6");
79 printf("playing sample6\n");
82 for (int i=0; i<10; i++) {