add alcSuspendContext and alcProcessContext again to prevent sound artifacts on hardware accelerated soundcards.
This commit is contained in:
@@ -274,6 +274,8 @@ void SGSoundMgr::unbind ()
|
|||||||
// run the audio scheduler
|
// run the audio scheduler
|
||||||
void SGSoundMgr::update( double dt ) {
|
void SGSoundMgr::update( double dt ) {
|
||||||
if (_active) {
|
if (_active) {
|
||||||
|
alcSuspendContext(_context);
|
||||||
|
|
||||||
if (_changed) {
|
if (_changed) {
|
||||||
update_pos_and_orientation();
|
update_pos_and_orientation();
|
||||||
}
|
}
|
||||||
@@ -310,6 +312,8 @@ if (isNaN(_velocity.data())) printf("NaN in listener velocity\n");
|
|||||||
testForALError("update");
|
testForALError("update");
|
||||||
_changed = false;
|
_changed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alcProcessContext(_context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user