]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/openal_test2.cxx
Add a HLADataElementVisitor implementation.
[simgear.git] / simgear / sound / openal_test2.cxx
index eb0da57e5007ccdd98a3b9c361da446156b3ee37..a136c83e10173c8eee6e7776c2de6fc8a6c2004c 100644 (file)
@@ -11,7 +11,6 @@
 
 #include "soundmgr_openal.hxx"
 
-SGGeod pos = SGGeod::fromDeg(0,0);
 
 int main( int argc, char *argv[] ) {
     SGSampleGroup *sgr;
@@ -23,10 +22,11 @@ int main( int argc, char *argv[] ) {
     smgr->init();
     sgr = smgr->find("default", true);
     smgr->set_volume(0.9);
-    smgr->set_position( SGVec3d::fromGeod(pos), pos );
     smgr->activate();
 
-    SGSoundSample *sample1 = new SGSoundSample( SRC_DIR, "jet.wav" );
+    SGPath srcDir(SRC_DIR);
+
+    SGSoundSample *sample1 = new SGSoundSample("jet.wav", srcDir);
     sample1->set_volume(1.0);
     sample1->set_pitch(1.0);
     sample1->play_looped();
@@ -35,7 +35,7 @@ int main( int argc, char *argv[] ) {
     printf("playing sample1\n");
     sleep(1);
 
-    SGSoundSample *sample2 = new SGSoundSample( SRC_DIR, "jet.wav" );
+    SGSoundSample *sample2 = new SGSoundSample("jet.wav", srcDir);
     sample2->set_volume(0.5);
     sample2->set_pitch(0.4);
     sample2->play_looped();
@@ -44,7 +44,7 @@ int main( int argc, char *argv[] ) {
     printf("playing sample2\n");
     sleep(1);
 
-    SGSoundSample *sample3 = new SGSoundSample( SRC_DIR, "jet.wav" );
+    SGSoundSample *sample3 = new SGSoundSample("jet.wav", srcDir);
     sample3->set_volume(0.5);
     sample3->set_pitch(0.8);
     sample3->play_looped();
@@ -53,7 +53,7 @@ int main( int argc, char *argv[] ) {
     printf("playing sample3\n");
     sleep(1);
 
-    SGSoundSample *sample4 = new SGSoundSample( SRC_DIR, "jet.wav" );
+    SGSoundSample *sample4 = new SGSoundSample("jet.wav", srcDir);
     sample4->set_volume(0.5);
     sample4->set_pitch(1.2);
     sample4->play_looped();
@@ -62,7 +62,7 @@ int main( int argc, char *argv[] ) {
     printf("playing sample4\n");
     sleep(1);
 
-    SGSoundSample *sample5 = new SGSoundSample( SRC_DIR, "jet.wav" );
+    SGSoundSample *sample5 = new SGSoundSample("jet.wav", srcDir);
     sample5->set_volume(0.5);
     sample5->set_pitch(1.6);
     sample5->play_looped();
@@ -71,7 +71,7 @@ int main( int argc, char *argv[] ) {
     printf("playing sample5\n");
     sleep(1);
 
-    SGSoundSample *sample6 = new SGSoundSample( SRC_DIR, "jet.wav" );
+    SGSoundSample *sample6 = new SGSoundSample("jet.wav", srcDir);
     sample6->set_volume(0.5);
     sample6->set_pitch(2.0);
     sample6->play_looped();