1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

XAudio2.8+ fix

This commit is contained in:
Nekotekina 2016-08-12 22:33:13 +03:00
parent 7a2802a5e0
commit 2d512121f1

View File

@ -131,6 +131,16 @@ void XAudio2Thread::xa28_open()
void XAudio2Thread::xa28_add(const void* src, int size)
{
XAUDIO2_VOICE_STATE state;
s_tls_source_voice->GetState(&state);
if (state.BuffersQueued > 32)
{
LOG_WARNING(GENERAL, "XAudio2Thread : too many buffers enqueued (%d, pos=%u)", state.BuffersQueued, state.SamplesPlayed);
return xa28_flush();
}
XAUDIO2_BUFFER buffer;
buffer.AudioBytes = size;