Module: wine Branch: master Commit: 80be4dad87c38d706979b7f457762458171af12f URL: http://source.winehq.org/git/wine.git/?a=commit;h=80be4dad87c38d706979b7f457...
Author: Andrew Eikum aeikum@codeweavers.com Date: Thu Sep 24 14:34:14 2015 -0500
xaudio2: Don't report mid-buffer positions.
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
---
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 4f8c76b..5c67ffb 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)