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 SGPath srcDir(SRC_DIR);
29 SGSoundSample *sample1 = new SGSoundSample("jet.wav", srcDir);
30 sample1->set_volume(1.0);
31 sample1->set_pitch(1.0);
32 sample1->play_looped();
33 sgr->add(sample1, "sound1");
35 printf("playing sample1\n");
38 SGSoundSample *sample2 = new SGSoundSample("jet.wav", srcDir);
39 sample2->set_volume(0.5);
40 sample2->set_pitch(0.4);
41 sample2->play_looped();
42 sgr->add(sample2, "sound2");
44 printf("playing sample2\n");
47 SGSoundSample *sample3 = new SGSoundSample("jet.wav", srcDir);
48 sample3->set_volume(0.5);
49 sample3->set_pitch(0.8);
50 sample3->play_looped();
51 sgr->add(sample3, "sound3");
53 printf("playing sample3\n");
56 SGSoundSample *sample4 = new SGSoundSample("jet.wav", srcDir);
57 sample4->set_volume(0.5);
58 sample4->set_pitch(1.2);
59 sample4->play_looped();
60 sgr->add(sample4, "sound4");
62 printf("playing sample4\n");
65 SGSoundSample *sample5 = new SGSoundSample("jet.wav", srcDir);
66 sample5->set_volume(0.5);
67 sample5->set_pitch(1.6);
68 sample5->play_looped();
69 sgr->add(sample5, "sound5");
71 printf("playing sample5\n");
74 SGSoundSample *sample6 = new SGSoundSample("jet.wav", srcDir);
75 sample6->set_volume(0.5);
76 sample6->set_pitch(2.0);
77 sample6->play_looped();
78 sgr->add(sample6, "sound6");
80 printf("playing sample6\n");
83 for (int i=0; i<10; i++) {