[Orxonox-commit 1508] r6226 - code/branches/presentation2/src/orxonox/gamestates

youngk at orxonox.net youngk at orxonox.net
Thu Dec 3 16:31:06 CET 2009


Author: youngk
Date: 2009-12-03 16:31:06 +0100 (Thu, 03 Dec 2009)
New Revision: 6226

Modified:
   code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc
Log:
At least managed to fix the "not-playing-sound-on-first-load" bug:
Main Menu sound now plays from the start. Reason: You can't play a sound when there's no source loaded (Worked before, but doesn't anymore).
On entry of a level the sound still doesn't play. I believe it's a problem in the AmbientSound class.

Modified: code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc	2009-12-03 14:22:39 UTC (rev 6225)
+++ code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc	2009-12-03 15:31:06 UTC (rev 6226)
@@ -103,7 +103,7 @@
         if (GameMode::playsSound())
         {
             this->ambient_->setLooping(true);
-            this->ambient_->play(); // works without source
+            //this->ambient_->play(); // works without source
         }
 
         this->setConfigValues();
@@ -140,6 +140,7 @@
         if (GameMode::playsSound())
         {
             this->ambient_->setAmbientSource(soundPathMain_);
+            this->ambient_->play();
         }
     }
 




More information about the Orxonox-commit mailing list