]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/openal_test4.cxx
Reset: allow re-init of Nasal Ghosts.
[simgear.git] / simgear / sound / openal_test4.cxx
index 866426d577e56db7eb659adb2c0895dd4bd663a1..eaf2bcab56c8327cffb6e34657febd32b9d3151d 100644 (file)
@@ -27,7 +27,7 @@ int main( int argc, char *argv[] ) {
     sgr = smgr->find("default", true);
     smgr->set_volume(0.9);
     smgr->activate();
-
+    smgr->set_position( SGVec3d::fromGeod(SGGeod()), SGGeod() );
 
     void *data;
     size_t len;
@@ -36,6 +36,8 @@ int main( int argc, char *argv[] ) {
     smgr->load(file, &data, &fmt, &len, &freq);
 
     squeue = new SGSampleQueue( freq, fmt );
+    squeue->set_volume(1.0);
+  
     sgr->add(squeue, "queue");
 
     squeue->add(  data, len );
@@ -49,7 +51,7 @@ int main( int argc, char *argv[] ) {
 
     printf("source at lat,lon = (10,-10), listener at (9.99,-9.99)\n");
     pos = SGGeod::fromDeg(9.99,-9.99);
-    squeue->set_position( SGVec3d::fromGeod(SGGeod::fromDeg(10,-10)) );
+    sgr->set_position_geod( SGGeod::fromDeg(10,-10) );
     smgr->set_position( SGVec3d::fromGeod(pos), pos );
 
     squeue->add(  data, len );