From: James Turner Date: Mon, 6 Sep 2010 13:27:58 +0000 (+0100) Subject: Second attempt to fixed OpenAL tests. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a7697f6095eca0a2b8e1129d8430aebb62138509;p=simgear.git Second attempt to fixed OpenAL tests. --- diff --git a/simgear/sound/openal_test2.cxx b/simgear/sound/openal_test2.cxx index d935b8d7..13a62d63 100644 --- a/simgear/sound/openal_test2.cxx +++ b/simgear/sound/openal_test2.cxx @@ -26,7 +26,9 @@ int main( int argc, char *argv[] ) { smgr->set_position( SGVec3d::fromGeod(pos), pos ); smgr->activate(); - SGSoundSample *sample1 = new SGSoundSample("jet.wav", SRC_DIR); + 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 +37,7 @@ int main( int argc, char *argv[] ) { printf("playing sample1\n"); sleep(1); - SGSoundSample *sample2 = new SGSoundSample("jet.wav", SRC_DIR); + SGSoundSample *sample2 = new SGSoundSample("jet.wav", srcDir); sample2->set_volume(0.5); sample2->set_pitch(0.4); sample2->play_looped(); @@ -44,7 +46,7 @@ int main( int argc, char *argv[] ) { printf("playing sample2\n"); sleep(1); - SGSoundSample *sample3 = new SGSoundSample("jet.wav", SRC_DIR); + SGSoundSample *sample3 = new SGSoundSample("jet.wav", srcDir); sample3->set_volume(0.5); sample3->set_pitch(0.8); sample3->play_looped(); @@ -53,7 +55,7 @@ int main( int argc, char *argv[] ) { printf("playing sample3\n"); sleep(1); - SGSoundSample *sample4 = new SGSoundSample("jet.wav", SRC_DIR); + SGSoundSample *sample4 = new SGSoundSample("jet.wav", srcDir); sample4->set_volume(0.5); sample4->set_pitch(1.2); sample4->play_looped(); @@ -62,7 +64,7 @@ int main( int argc, char *argv[] ) { printf("playing sample4\n"); sleep(1); - SGSoundSample *sample5 = new SGSoundSample("jet.wav", SRC_DIR); + SGSoundSample *sample5 = new SGSoundSample("jet.wav", srcDir); sample5->set_volume(0.5); sample5->set_pitch(1.6); sample5->play_looped(); @@ -71,7 +73,7 @@ int main( int argc, char *argv[] ) { printf("playing sample5\n"); sleep(1); - SGSoundSample *sample6 = new SGSoundSample("jet.wav", SRC_DIR); + SGSoundSample *sample6 = new SGSoundSample("jet.wav", srcDir); sample6->set_volume(0.5); sample6->set_pitch(2.0); sample6->play_looped(); diff --git a/simgear/sound/openal_test3.cxx b/simgear/sound/openal_test3.cxx index 70260289..fafb4045 100644 --- a/simgear/sound/openal_test3.cxx +++ b/simgear/sound/openal_test3.cxx @@ -25,8 +25,10 @@ int main( int argc, char *argv[] ) { smgr->set_volume(0.9); smgr->activate(); + SGPath srcDir(SRC_DIR); + printf("default position and orientation\n"); - SGSoundSample *sample1 = new SGSoundSample("jet.wav", SRC_DIR); + SGSoundSample *sample1 = new SGSoundSample("jet.wav", srcDir); sample1->set_volume(1.0); sample1->set_pitch(1.0); sample1->play_looped();