From 01bed0527539c3d1cc97061aef19667ae41e0c1d Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 12 Feb 2016 16:27:47 -0600 Subject: [PATCH 1/2] Do not use fast math for the node builder - The node builder generates data used by the playsim, so should be as consistant as we can manage across compilers and architectures. --- src/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 47351a1f7..6b5f66a3e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -865,12 +865,6 @@ set( NOT_COMPILED_SOURCE_FILES ) set( FASTMATH_SOURCES - nodebuild.cpp - nodebuild_classify_nosse2.cpp - nodebuild_events.cpp - nodebuild_extract.cpp - nodebuild_gl.cpp - nodebuild_utility.cpp r_swrenderer.cpp r_3dfloors.cpp r_bsp.cpp @@ -1026,6 +1020,12 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE memarena.cpp md5.cpp name.cpp + nodebuild.cpp + nodebuild_classify_nosse2.cpp + nodebuild_events.cpp + nodebuild_extract.cpp + nodebuild_gl.cpp + nodebuild_utility.cpp pathexpander.cpp p_3dfloors.cpp p_3dmidtex.cpp From ce8b2974a3f93ec66995442329765084306b53f2 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 13 Feb 2016 11:09:37 +0200 Subject: [PATCH 2/2] Handle inability of OpenAL implementation to return number of available sources OpenAL specification doesn't require alcGetIntegerv() to return meaningful values for ALC_MONO_SOURCES and ALC_MONO_SOURCES. At least Apple's OpenAL implementation returns zeroes, although it can generate reasonable number of sources. --- src/sound/oalsound.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp index 1eec34c1b..736893de7 100644 --- a/src/sound/oalsound.cpp +++ b/src/sound/oalsound.cpp @@ -781,7 +781,20 @@ OpenALSoundRenderer::OpenALSoundRenderer() alcGetIntegerv(Device, ALC_MONO_SOURCES, 1, &numMono); alcGetIntegerv(Device, ALC_STEREO_SOURCES, 1, &numStereo); - Sources.Resize(MIN(MAX(*snd_channels, 2), numMono+numStereo)); + // OpenAL specification doesn't require alcGetIntegerv() to return + // meaningful values for ALC_MONO_SOURCES and ALC_MONO_SOURCES. + // At least Apple's OpenAL implementation returns zeroes, + // although it can generate reasonable number of sources. + + const int numChannels = MAX(*snd_channels, 2); + int numSources = numMono + numStereo; + + if (0 == numSources) + { + numSources = numChannels; + } + + Sources.Resize(MIN(numChannels, numSources)); for(size_t i = 0;i < Sources.Size();i++) { alGenSources(1, &Sources[i]);