Fixing broken instruction decoding.

This commit is contained in:
Ben Vanik
2014-01-13 23:24:28 -08:00
parent 857ce4a2e2
commit 81226db1b4
2 changed files with 8 additions and 6 deletions

View File

@@ -125,8 +125,10 @@ void XAudio2AudioSystem::Pump() {
XAUDIO2_VOICE_STATE state;
pcm_voice_->GetState(&state);
auto n = state.BuffersQueued;
if (n > 1) {
// A lot of buffers are queued up, and until we use them block.
if (n > 0) {
// Only allow one buffer to be queued at once. We only have one static
// store of data, and if we called back the game audio driver it would
// overwrite it.
ResetEvent(wait_handle_);
}