winmm: PlaySound ignores SND_NOWAIT. (try 2)

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Fri Jan 14 00:52:46 CST 2011


Hi,

I'm sorry for the apply failure:
Emacs' v22 diff-mode has a bug where it mangles the line number count in a
way incompatible with git apply. Patch works. Work-around:
- use an older Emacs
- use a newer Emacs (I believe v23 works)
- fix diff mode
- use M-xfundamental-mode for editing and fixing the typo
- add a blank line prior to the trailing --\n git line

I tested real w95, w2k and wxp machines.  All behave the same.
 - SND_NOWAIT is ignored.
 - SND_NOSTOP controls whether to abort an already playing sound or
   whether to ignore the new sound and return FALSE.
I could not observe a queue of sounds piling up.  New aborts old or is rejected.

Now Wine behaves like these systems.  This fixes bug 13852.

Test code involves GNU CLISP http://clisp.cons.org
(def-call-out playsoundfile
    (:name "PlaySoundA") (:library "winmm.dll") (:language :stdc-stdcall)
    (:return-type boolean)
    (:arguments (sound c-string) (mod c-pointer) (flags uint)))
(defvar *sound* "C:\\Windows\\Media\\chimes.wav")
(defun playN (n &optional (flags #x00002001) (sleep 0.0s0))
   (loop repeat n collect (playsoundfile *sound* nil flags) do (sleep sleep)))

;(playn 5 #x00000001)
;->(T T T T T) -- sound is interrupted (clearer with 0.3s0 sleep)
;(playn 5 #x00000011)
;->(T NIL NIL NIL NIL)
;(playn 5 #x0011 0.3s0)
;->(T NIL NIL T NIL) -- sound plays twice in full
; Adding #x00002000 makes no difference.

Regards,
 Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-winmm-PlaySound-ignoress-SND_NOWAIT.patch
Type: application/octet-stream
Size: 1092 bytes
Desc: 0001-winmm-PlaySound-ignoress-SND_NOWAIT.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20110114/0c469232/attachment-0001.obj>


More information about the wine-patches mailing list