From a6f885b1fb295a17c5529715884272c30d73f65c Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 5 Sep 2008 09:18:33 +0000 Subject: [PATCH] Move the soundmanager update code back to the main loop, just prior to updating all the SGSubsystems. Hopefuly this silves the sound problem. --- src/Main/main.cxx | 2 ++ src/Sound/fg_fx.cxx | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 54d2bdbc7..14debbd82 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -481,6 +481,8 @@ static void fgMainLoop( void ) { "Elapsed time is zero ... we're zinging" ); } + SGSoundMgr *smgr = globals->get_soundmgr(); + smgr->update(delta_time_sec); globals->get_subsystem_mgr()->update(delta_time_sec); // diff --git a/src/Sound/fg_fx.cxx b/src/Sound/fg_fx.cxx index ad9c4ed47..6df4505d3 100644 --- a/src/Sound/fg_fx.cxx +++ b/src/Sound/fg_fx.cxx @@ -137,7 +137,10 @@ FGFX::update (double dt) return; } +#if 0 + // moved back to the mainloop to prevent audio problems smgr->update(dt); +#endif update_pos_and_orientation(smgr, dt); // command sound manger