From bb204a2689d8503a3138d0e50d06afaa5bdd7ca2 Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Fri, 6 Feb 2009 14:10:54 +0000 Subject: [PATCH] fixed: synchronization issue git-svn-id: svn://kolibrios.org@1024 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/drivers/infinity.asm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/trunk/drivers/infinity.asm b/kernel/trunk/drivers/infinity.asm index 2e006c935d..1bf9859ee9 100644 --- a/kernel/trunk/drivers/infinity.asm +++ b/kernel/trunk/drivers/infinity.asm @@ -679,6 +679,8 @@ proc wave_out stdcall, str:dword,src:dword,size:dword mov [edx+STREAM.out_rp], eax mov [edx+STREAM.out_count], 0 .fill: + cli + mov ecx, [edx+STREAM.in_free] test ecx, ecx jz .wait @@ -716,7 +718,9 @@ proc wave_out stdcall, str:dword,src:dword,size:dword mov [state_saved], 1 @@: stdcall refill, edx + .skip: + sti mov edx, [str] mov [edx+STREAM.flags], SND_PLAY cmp [eng_state], SND_PLAY @@ -726,6 +730,7 @@ proc wave_out stdcall, str:dword,src:dword,size:dword mov [eng_state], SND_PLAY jmp .main_loop .wait: + sti mov edx, [str] mov eax, [edx+STREAM.notify_event] mov ebx, [edx+STREAM.notify_id]