winmm: PlaySound ignores SND_NOWAIT.
Joerg-Cyril.Hoehle at t-systems.com
Joerg-Cyril.Hoehle at t-systems.com
Thu Jan 13 04:50:50 CST 2011
Hi,
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/20110113/64b287ef/attachment-0001.obj>
More information about the wine-patches
mailing list