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"
13 #include "sample_group.hxx"
14 #include "sample_openal.hxx"
17 int main( int argc, char *argv[] ) {
21 smgr = new SGSoundMgr;
25 sgr = smgr->find("default", true);
26 smgr->set_volume(0.9);
29 SGPath srcDir(SRC_DIR);
31 SGSoundSample *sample1 = new SGSoundSample("jet.wav", srcDir);
32 sample1->set_volume(1.0);
33 sample1->set_pitch(1.0);
34 sample1->play_looped();
35 sgr->add(sample1, "sound1");
37 printf("playing sample1\n");
40 SGSoundSample *sample2 = new SGSoundSample("jet.wav", srcDir);
41 sample2->set_volume(0.5);
42 sample2->set_pitch(0.4);
43 sample2->play_looped();
44 sgr->add(sample2, "sound2");
46 printf("playing sample2\n");
49 SGSoundSample *sample3 = new SGSoundSample("jet.wav", srcDir);
50 sample3->set_volume(0.5);
51 sample3->set_pitch(0.8);
52 sample3->play_looped();
53 sgr->add(sample3, "sound3");
55 printf("playing sample3\n");
58 SGSoundSample *sample4 = new SGSoundSample("jet.wav", srcDir);
59 sample4->set_volume(0.5);
60 sample4->set_pitch(1.2);
61 sample4->play_looped();
62 sgr->add(sample4, "sound4");
64 printf("playing sample4\n");
67 SGSoundSample *sample5 = new SGSoundSample("jet.wav", srcDir);
68 sample5->set_volume(0.5);
69 sample5->set_pitch(1.6);
70 sample5->play_looped();
71 sgr->add(sample5, "sound5");
73 printf("playing sample5\n");
76 SGSoundSample *sample6 = new SGSoundSample("jet.wav", srcDir);
77 sample6->set_volume(0.5);
78 sample6->set_pitch(2.0);
79 sample6->play_looped();
80 sgr->add(sample6, "sound6");
82 printf("playing sample6\n");
85 for (int i=0; i<10; i++) {