Andrew Eikum : winecoreaudio.drv: Don' t return 0 absolute position if AudioQueue call fails.

Alexandre Julliard julliard at winehq.org
Fri Jan 10 14:44:56 CST 2014


Module: wine
Branch: stable
Commit: deca08bc93d54a6f06462d80640fa75b1fc00ab1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=deca08bc93d54a6f06462d80640fa75b1fc00ab1

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Thu Nov 21 12:42:35 2013 -0600

winecoreaudio.drv: Don't return 0 absolute position if AudioQueue call fails.

Some failures are temporary, for example if the user reconfigures their
audio setup while playing audio. Returning 0 could have bad "going
backward in time" effects which can break audio even after the call
starts to succeed again.

(cherry picked from commit f53dd40ad881cc7f887c0587d42f70bb07ddd2e0)

---

 dlls/winecoreaudio.drv/mmdevdrv.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c
index 92be329..7a0b3ff 100644
--- a/dlls/winecoreaudio.drv/mmdevdrv.c
+++ b/dlls/winecoreaudio.drv/mmdevdrv.c
@@ -681,6 +681,8 @@ static UINT64 get_current_aqbuffer_position(ACImpl *This, int mode)
         if(sc != noErr){
             if(sc != kAudioQueueErr_InvalidRunState)
                 WARN("Unable to get current time: %lx\n", sc);
+            if(mode == BUFPOS_ABSOLUTE)
+                return This->highest_sampletime;
             return 0;
         }
 




More information about the wine-cvs mailing list