Discard the current packet when XMA context is released

Some more cleanup
This commit is contained in:
Dr. Chat
2015-05-22 21:53:46 -05:00
parent a6175dba48
commit a69d1b7f04
3 changed files with 3 additions and 9 deletions

View File

@@ -19,8 +19,6 @@
#include "xenia/kernel/objects/xthread.h"
#include "xenia/profiling.h"
#include "libavutil/log.h"
// As with normal Microsoft, there are like twelve different ways to access
// the audio APIs. Early games use XMA*() methods almost exclusively to touch
// decoders. Later games use XAudio*() and direct memory writes to the XMA
@@ -362,6 +360,7 @@ void AudioSystem::ReleaseXmaContext(uint32_t guest_ptr) {
context.in_use = false;
auto context_ptr = memory()->TranslateVirtual(guest_ptr);
std::memset(context_ptr, 0, kXmaContextSize); // Zero it.
context.decoder->DiscardPacket();
context.lock.unlock();
}