Some more checking in PCM provider. Had apparently missed a way EnsureRangeAceesibleble() could fail. This means of failure should no longer be possible.

Originally committed to SVN as r2240.
This commit is contained in:
Niels Martin Hansen 2008-07-05 12:50:49 +00:00
parent 51c9856160
commit 923b347356
2 changed files with 16 additions and 11 deletions

View file

@ -141,7 +141,7 @@ char * PCMAudioProvider::EnsureRangeAccessible(int64_t range_start, int64_t rang
} }
// Check whether the requested range is already visible // Check whether the requested range is already visible
if (range_start < mapping_start || range_start+range_length > mapping_start+(int64_t)mapping_length) { if (!current_mapping || range_start < mapping_start || range_start+range_length > mapping_start+(int64_t)mapping_length) {
// It's not visible, change the current mapping // It's not visible, change the current mapping
@ -200,6 +200,7 @@ char * PCMAudioProvider::EnsureRangeAccessible(int64_t range_start, int64_t rang
} }
assert(current_mapping);
assert(range_start >= mapping_start); assert(range_start >= mapping_start);
// Difference between actual current mapping start and requested range start // Difference between actual current mapping start and requested range start

View file

@ -71,7 +71,7 @@ AC_C_BIGENDIAN(
AC_DEFINE([HAVE_BIG_ENDIAN], [1], [Big Endian]), AC_DEFINE([HAVE_BIG_ENDIAN], [1], [Big Endian]),
AC_DEFINE([HAVE_LITTLE_ENDIAN], [1], [Little Endian]), AC_DEFINE([HAVE_LITTLE_ENDIAN], [1], [Little Endian]),
AC_DEFINE([HAVE_DYNAMIC_ENDIAN], [1], [Unknown endian]), AC_DEFINE([HAVE_DYNAMIC_ENDIAN], [1], [Unknown endian]),
AC_DEFINE([HAVE_UNIVERSAL_ENDIAN], [1], [Universal Endian (MAC Universal PPC/Intel Binaries, uses HAVE_DYNAMIC_ENDIAN)]) AC_DEFINE([HAVE_UNIVERSAL_ENDIAN], [1], [Universal Endian (MAC Universal PPC/Intel Binaries, detecting correct during build)])
) )
@ -204,15 +204,19 @@ if test "$agi_with_opengl" = "no"; then
AC_MSG_FAILURE([Please install a working OpenGL library.]) AC_MSG_FAILURE([Please install a working OpenGL library.])
fi fi
AC_AGI_COMPILE([OpenGLU], [openglu], [$GL_CFLAGS], [$GL_LIBS -lGLU],[ #AC_AGI_COMPILE([OpenGLU], [openglu], [$GL_CFLAGS], [$GL_LIBS -lGLU],[
#include <GL/glu.h> ##ifdef __APPLE__
int main(void) { ##include <OpenGL/glu.h>
return 0; ##else
}]) ##include <GL/glu.h>
##endif
if test "$agi_with_openglu" = "no"; then #int main(void) {
AC_MSG_FAILURE([Please install a working OpenGL GLU library.]) # return 0;
fi #}])
#
#if test "$agi_with_openglu" = "no"; then
# AC_MSG_FAILURE([Please install a working OpenGL GLU library.])
#fi
########### ###########