reduced buffer count to 5
added logging of empty buffer queue
This commit is contained in:
parent
982f3a8d3c
commit
800015a05d
|
@ -38,7 +38,7 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
||||||
#define NBUFFERS 8
|
#define NBUFFERS 5
|
||||||
//#define LOGALL
|
//#define LOGALL
|
||||||
// LOGALL writes very detailed informations to vba-trace.log
|
// LOGALL writes very detailed informations to vba-trace.log
|
||||||
|
|
||||||
|
@ -282,6 +282,11 @@ void OpenAL::write()
|
||||||
ALFunction.alGetSourcei( source, AL_BUFFERS_PROCESSED, &nBuffersProcessed );
|
ALFunction.alGetSourcei( source, AL_BUFFERS_PROCESSED, &nBuffersProcessed );
|
||||||
assert( AL_NO_ERROR == ALFunction.alGetError() );
|
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 ) {
|
if( !speedup && synchronize && !theApp.throttle ) {
|
||||||
// wait until at least one buffer has finished
|
// wait until at least one buffer has finished
|
||||||
while( nBuffersProcessed == 0 ) {
|
while( nBuffersProcessed == 0 ) {
|
||||||
|
|
Loading…
Reference in New Issue