Added more debug messages to openAL audio manager for closing it.

We use resent OpenAL-soft in the distribution (1.12 or more instead of 1.8)

There is this bug:
OpenAl soft some times selects ALSA software
ALSO software some times has a bug working with pulse audio
So we need to make sure OpenAL uses pulse audio directoly, then it works.

KittCat (openAL soft author):
well, more like worked around it. but it's not something I can fix in openal soft
I've gone over the code several times and had other people comment on it. alsa just enables mmap when using the pulse plugin even though the plugin doesn't support it
using the pulse api directly (or disable using mmap with alsa) gets around the problem, though
This commit is contained in:
treeform 2010-04-03 07:26:00 +00:00
parent d5071f89b6
commit d5ebb58874

View File

@ -143,12 +143,14 @@ OpenALAudioManager() {
alcMakeContextCurrent(_context);
alc_audio_errcheck("alcMakeContextCurrent(_context)",_device);
// set 3D sound characteristics as they are given in the configrc
audio_3d_set_doppler_factor(audio_doppler_factor);
audio_3d_set_distance_factor(audio_distance_factor);
audio_3d_set_drop_off_factor(audio_drop_off_factor);
}
audio_cat->debug() << "ALC_DEVICE_SPECIFIER:" << alcGetString(_device, ALC_DEVICE_SPECIFIER) << endl;
audio_cat->debug() << "AL_RENDERER:" << alGetString(AL_RENDERER) << endl;
audio_cat->debug() << "AL_VENDOR:" << alGetString(AL_VENDOR) << endl;
audio_cat->debug() << "AL_VERSION:" << alGetString(AL_VERSION) << endl;
@ -951,9 +953,11 @@ cleanup() {
_context = NULL;
if (_device) {
audio_debug("Going to try to close openAL");
alcCloseDevice(_device);
//alc_audio_errcheck("alcCloseDevice(_device)",_device);
_device = NULL;
audio_debug("openAL Closed");
}
_openal_active = false;