4 #define sleep(x) Sleep(x*1000)
9 #include <simgear/debug/logstream.hxx>
10 #include <simgear/misc/sg_path.hxx>
11 #include <simgear/timing/timestamp.hxx>
13 #include "soundmgr_openal.hxx"
14 #include "sample_group.hxx"
15 #include "sample_openal.hxx"
18 int main( int argc, char *argv[] ) {
22 smgr = new SGSoundMgr;
26 sgr = smgr->find("default", true);
27 smgr->set_volume(0.9);
30 SGPath srcDir(SRC_DIR);
32 SGSoundSample *sample1 = new SGSoundSample("jet.wav", srcDir);
33 sample1->set_volume(1.0);
34 sample1->set_pitch(1.0);
35 sample1->play_looped();
36 sgr->add(sample1, "sound1");
38 printf("playing sample1\n");
41 SGSoundSample *sample2 = new SGSoundSample("jet.wav", srcDir);
42 sample2->set_volume(0.5);
43 sample2->set_pitch(0.4);
44 sample2->play_looped();
45 sgr->add(sample2, "sound2");
47 printf("playing sample2\n");
50 SGSoundSample *sample3 = new SGSoundSample("jet.wav", srcDir);
51 sample3->set_volume(0.5);
52 sample3->set_pitch(0.8);
53 sample3->play_looped();
54 sgr->add(sample3, "sound3");
56 printf("playing sample3\n");
59 SGSoundSample *sample4 = new SGSoundSample("jet.wav", srcDir);
60 sample4->set_volume(0.5);
61 sample4->set_pitch(1.2);
62 sample4->play_looped();
63 sgr->add(sample4, "sound4");
65 printf("playing sample4\n");
68 SGSoundSample *sample5 = new SGSoundSample("jet.wav", srcDir);
69 sample5->set_volume(0.5);
70 sample5->set_pitch(1.6);
71 sample5->play_looped();
72 sgr->add(sample5, "sound5");
74 printf("playing sample5\n");
77 SGSoundSample *sample6 = new SGSoundSample("jet.wav", srcDir);
78 sample6->set_volume(0.5);
79 sample6->set_pitch(2.0);
80 sample6->play_looped();
81 sgr->add(sample6, "sound6");
83 printf("playing sample6\n");
86 for (int i=0; i<10; i++) {
94 SGTimeStamp::sleepForMSec(500);