Author: hbelusca Date: Sat Nov 8 16:35:05 2014 New Revision: 65325
URL: http://svn.reactos.org/svn/reactos?rev=65325&view=rev Log: [KERNEL32][BEEP] Int32x32To64 used with unsigned input values will cause unintentional sign extension. There is a lot of code in ROS that is still not fixed!! Fixes BEEP sound. See also r64020, CORE-8502 and CORE-8505 for more details. CORE-8505 #comment CsrCaptureTimeout and BEEP code fixed.
Modified: trunk/reactos/dll/ntdll/csr/capture.c trunk/reactos/drivers/base/beep/beep.c
Modified: trunk/reactos/dll/ntdll/csr/capture.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/csr/capture.c?rev... ============================================================================== --- trunk/reactos/dll/ntdll/csr/capture.c [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/csr/capture.c [iso-8859-1] Sat Nov 8 16:35:05 2014 @@ -321,7 +321,7 @@ if (Milliseconds == -1) return NULL;
/* Convert to relative ticks */ - Timeout->QuadPart = Int32x32To64(Milliseconds, -10000); + Timeout->QuadPart = Milliseconds * -10000LL; return Timeout; }
Modified: trunk/reactos/drivers/base/beep/beep.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/beep/beep.c?re... ============================================================================== --- trunk/reactos/drivers/base/beep/beep.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/beep/beep.c [iso-8859-1] Sat Nov 8 16:35:05 2014 @@ -339,7 +339,7 @@ { /* Beep successful, queue a DPC to stop it */ Status = STATUS_SUCCESS; - DueTime.QuadPart = Int32x32To64(BeepParam->Duration, -10000); + DueTime.QuadPart = BeepParam->Duration * -10000LL; InterlockedIncrement(&DeviceExtension->TimerActive); KeSetTimer(&DeviceExtension->Timer, DueTime, &DeviceObject->Dpc); }