From 80be4dad87c38d706979b7f457762458171af12f Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Thu, 24 Sep 2015 14:34:14 -0500 Subject: [PATCH] xaudio2: Don't report mid-buffer positions. Signed-off-by: Andrew Eikum --- dlls/xaudio2_7/xaudio_dll.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index 4f8c76beef4..5c67ffb8621 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -776,13 +776,9 @@ static void WINAPI XA2SRC_GetState(IXAudio2SourceVoice *iface, EnterCriticalSection(&This->lock); - if(!(Flags & XAUDIO2_VOICE_NOSAMPLESPLAYED)){ - ALint bufpos = 0; - - alGetSourcei(This->al_src, AL_SAMPLE_OFFSET, &bufpos); - - pVoiceState->SamplesPlayed = This->played_frames + bufpos; - }else + if(!(Flags & XAUDIO2_VOICE_NOSAMPLESPLAYED)) + pVoiceState->SamplesPlayed = This->played_frames; + else pVoiceState->SamplesPlayed = 0; if(This->nbufs)