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.
This commit is contained in:
Andrew Eikum 2013-11-21 12:42:35 -06:00 committed by Alexandre Julliard
parent 57d7f74d34
commit f53dd40ad8
1 changed files with 2 additions and 0 deletions

View File

@ -688,6 +688,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;
}