From: ehofman Date: Sun, 6 Dec 2009 09:56:01 +0000 (+0000) Subject: add alcSuspendContext and alcProcessContext again to prevent sound artifacts on hardw... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b1200f9f5962282a335f79fc4289d2ef77a7d61c;p=simgear.git add alcSuspendContext and alcProcessContext again to prevent sound artifacts on hardware accelerated soundcards. --- diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index 6100dfcf..618d44f3 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -274,6 +274,8 @@ void SGSoundMgr::unbind () // run the audio scheduler void SGSoundMgr::update( double dt ) { if (_active) { + alcSuspendContext(_context); + if (_changed) { update_pos_and_orientation(); } @@ -310,6 +312,8 @@ if (isNaN(_velocity.data())) printf("NaN in listener velocity\n"); testForALError("update"); _changed = false; } + + alcProcessContext(_context); } }