- SGSoundSample sample6( ".", "jet.wav", true );
- sample6.set_volume(0.5);
- sample6.set_pitch(2.0);
- sample6.play_looped();
+ SGSoundSample *sample6 = new SGSoundSample( SRC_DIR, "jet.wav" );
+ sample6->set_volume(0.5);
+ sample6->set_pitch(2.0);
+ sample6->play_looped();
+ sgr->add(sample6, "sound6");
+ smgr->update(1.0);
+ printf("playing sample6\n");
+ sleep(1);
+
+ for (int i=0; i<10; i++) {
+ sleep(1);
+ smgr->update(1);
+ }
+
+ sgr->stop("sound1");
+ sgr->stop("sound2");
+ sgr->stop("sound3");
+ sleep(0.5);
+ smgr->update(0.5);
+ sgr->stop("sound4");
+ sgr->stop("sound5");
+ sgr->stop("sound6");
+ smgr->update(1);