Maarten Lankhorst : winealsa: Minor fixes to ds output.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jul 27 07:34:39 CDT 2007


Module: wine
Branch: master
Commit: 3c8c02a39352f1f72603ec067793e334f194fd7a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3c8c02a39352f1f72603ec067793e334f194fd7a

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Thu Jul 19 00:58:23 2007 +0200

winealsa: Minor fixes to ds output.

---

 dlls/winealsa.drv/dsoutput.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/winealsa.drv/dsoutput.c b/dlls/winealsa.drv/dsoutput.c
index 7990a0f..dbac200 100644
--- a/dlls/winealsa.drv/dsoutput.c
+++ b/dlls/winealsa.drv/dsoutput.c
@@ -157,7 +157,7 @@ static void CheckXRUN(IDsDriverBufferImpl* This)
                 ERR("recovery from suspend failed, prepare failed: %s\n", snd_strerror(err));
         }
     } else if ( state != SND_PCM_STATE_RUNNING ) {
-        WARN("Unhandled state: %d\n", state);
+        FIXME("Unhandled state: %d\n", state);
     }
 }
 
@@ -490,9 +490,12 @@ static HRESULT WINAPI IDsDriverBufferImpl_GetPosition(PIDSDRIVERBUFFER iface,
 
     state = snd_pcm_state(This->pcm);
 
-    if (state != SND_PCM_STATE_RUNNING)
+    if (state != SND_PCM_STATE_PREPARED && state != SND_PCM_STATE_RUNNING)
+    {
         CheckXRUN(This);
-    else
+        state = snd_pcm_state(This->pcm);
+    }
+    if (state == SND_PCM_STATE_RUNNING)
     {
         snd_pcm_uframes_t used = CommitAll(This);
 




More information about the wine-cvs mailing list