XAudio2 will now output a warning to the log window, when the buffers ran dry. Debug build only.

This commit is contained in:
spacy51 2008-04-05 01:49:15 +00:00
parent e3d4c0f2b5
commit f135b6f28a
1 changed files with 7 additions and 0 deletions

View File

@ -255,6 +255,13 @@ void XAudio2_Output::write()
if( vState.BuffersQueued < NBUFFERS ) {
// there is at least one free buffer
#ifdef _DEBUG
if( vState.BuffersQueued == 0 ) {
// buffers ran dry
static int i = 0;
log( "XAudio2: Buffers were not refilled fast enough (%i)\n", i++ );
}
#endif
break;
} else {
// the maximum number of buffers is currently queued