From d5ebb588748cd3276f4770a9c4a28e3ba661d34a Mon Sep 17 00:00:00 2001 From: treeform Date: Sat, 3 Apr 2010 07:26:00 +0000 Subject: [PATCH] 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 --- panda/src/audiotraits/openalAudioManager.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/panda/src/audiotraits/openalAudioManager.cxx b/panda/src/audiotraits/openalAudioManager.cxx index 4d0593e74f..34b7db9296 100644 --- a/panda/src/audiotraits/openalAudioManager.cxx +++ b/panda/src/audiotraits/openalAudioManager.cxx @@ -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;