From 86320355b8e69430b862feb0bc9fc4776ed5560a Mon Sep 17 00:00:00 2001 From: spacy51 Date: Sat, 15 Dec 2007 19:40:05 +0000 Subject: [PATCH] reduced buffer count to 5 added logging of empty buffer queue git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@207 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/win32/OpenAL.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/win32/OpenAL.cpp b/src/win32/OpenAL.cpp index 9444f062..d3f726cc 100644 --- a/src/win32/OpenAL.cpp +++ b/src/win32/OpenAL.cpp @@ -38,7 +38,7 @@ #include -#define NBUFFERS 8 +#define NBUFFERS 5 //#define LOGALL // LOGALL writes very detailed informations to vba-trace.log @@ -282,6 +282,11 @@ void OpenAL::write() ALFunction.alGetSourcei( source, AL_BUFFERS_PROCESSED, &nBuffersProcessed ); assert( AL_NO_ERROR == ALFunction.alGetError() ); + if( nBuffersProcessed == NBUFFERS ) { + static int i = 0; + log( "OpenAL: Buffers were not refilled fast enough (%i)\n", i++ ); + } + if( !speedup && synchronize && !theApp.throttle ) { // wait until at least one buffer has finished while( nBuffersProcessed == 0 ) {