From b1200f9f5962282a335f79fc4289d2ef77a7d61c Mon Sep 17 00:00:00 2001 From: ehofman Date: Sun, 6 Dec 2009 09:56:01 +0000 Subject: [PATCH] add alcSuspendContext and alcProcessContext again to prevent sound artifacts on hardware accelerated soundcards. --- simgear/sound/soundmgr_openal.cxx | 4 ++++ 1 file changed, 4 insertions(+) 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); } } -- 2.39.5