mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Fixed excessive use of make_current
This commit is contained in:
parent
2185c271e2
commit
1ec5c0380d
@ -142,7 +142,9 @@ OpenALAudioManager() {
|
|||||||
audio_error("OpenALAudioManager: No open device or context");
|
audio_error("OpenALAudioManager: No open device or context");
|
||||||
_is_valid = false;
|
_is_valid = false;
|
||||||
} else {
|
} else {
|
||||||
make_current();
|
alcGetError(_device); // clear errors
|
||||||
|
alcMakeContextCurrent(_context);
|
||||||
|
alc_audio_errcheck("alcMakeContextCurrent(_context)",_device);
|
||||||
|
|
||||||
// set 3D sound characteristics as they are given in the configrc
|
// set 3D sound characteristics as they are given in the configrc
|
||||||
audio_3d_set_doppler_factor(audio_doppler_factor);
|
audio_3d_set_doppler_factor(audio_doppler_factor);
|
||||||
@ -208,9 +210,7 @@ is_valid() {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void OpenALAudioManager::
|
void OpenALAudioManager::
|
||||||
make_current() const {
|
make_current() const {
|
||||||
alcGetError(_device); // clear errors
|
// Since we only use one context, this is now a no-op.
|
||||||
alcMakeContextCurrent(_context);
|
|
||||||
alc_audio_errcheck("alcMakeContextCurrent(_context)",_device);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user