winealsa.drv: Waveout rewrite to allow multiple waveopens

Maarten Lankhorst m.b.lankhorst at gmail.com
Tue Mar 8 13:44:06 CST 2011


Hi Joerg,

Op 08-03-11 12:36, Joerg-Cyril.Hoehle at t-systems.com schreef:
> Maarten,
>
> let me apologize for barely taking the time to look at the extra patches
> you write outside of the main git tree.  I hope other people find more time
> to try them out with real apps and report on their findings.
>
> Here are a few comments of mine on your winealsa rewrite (beside bug #22261, comment #6).
>
> - It's been a pleasure to hear mciwave+winealsa open multiple devices concurrently
>    with dmix mixing all playing sounds thanks to this rewrite.
>
>
> - wodNotifyDoneList is called from within a critical section in wodTick().
> This may break havoc with DCB_FUNCTION callbacks, as the driver
> does not appear to be re-entrant.
>
> EnterCriticalSection offers no protection from within the same thread.
> Some apps are known to call waveOutClose() from within the DONE callback.
>

Didn't check yet. Maybe useful for the winmm->mmdevapi stuff.

> Of course you may delegate this issue to a solution to bug #3930.  I'd be curious
> if you have any ideas about how to delay notification to a later point
> in time, "until it is safe to do" -- native appears to delay as well.
>
>
> - You may wish to look into bug #22880.
> Lemmix is a small (143KB) downloadable application that opens two waveout devices.
> It plays both music and sound effects on Mac OS using the winecoreaudio
> driver, but fails to do so with your ALSA driver, although both devices open
> and WINEDEBUG=+wave shows calls to waveOutWrite.  I could not figure out
> what goes wrong.

@@ -488,8 +488,9 @@ static DWORD wodReset(waveimpl *dev, wavestreamimpl 
*wwo) {
          savedqueue = wwo->queue;
      wwo->queue = wwo->loop = NULL;
      wwo->ofs = 0;
-    wwo->stopped = 1;
      snd_pcm_drop(wwo->pcm);
+    snd_pcm_prepare(wwo->pcm);
+    snd_pcm_start(wwo->pcm);
      LeaveCriticalSection(&dev->crst);

      wodNotifyDoneList(wwo, savedqueue);

Cheers,
Maarten



More information about the wine-devel mailing list