mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 17:05:45 +00:00
[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. svn path=/trunk/; revision=65325
This commit is contained in:
parent
b461fd27f1
commit
1b2bbd97fa
2 changed files with 2 additions and 2 deletions
|
@ -321,7 +321,7 @@ CsrCaptureTimeout(IN ULONG Milliseconds,
|
||||||
if (Milliseconds == -1) return NULL;
|
if (Milliseconds == -1) return NULL;
|
||||||
|
|
||||||
/* Convert to relative ticks */
|
/* Convert to relative ticks */
|
||||||
Timeout->QuadPart = Int32x32To64(Milliseconds, -10000);
|
Timeout->QuadPart = Milliseconds * -10000LL;
|
||||||
return Timeout;
|
return Timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -339,7 +339,7 @@ BeepStartIo(IN PDEVICE_OBJECT DeviceObject,
|
||||||
{
|
{
|
||||||
/* Beep successful, queue a DPC to stop it */
|
/* Beep successful, queue a DPC to stop it */
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
DueTime.QuadPart = Int32x32To64(BeepParam->Duration, -10000);
|
DueTime.QuadPart = BeepParam->Duration * -10000LL;
|
||||||
InterlockedIncrement(&DeviceExtension->TimerActive);
|
InterlockedIncrement(&DeviceExtension->TimerActive);
|
||||||
KeSetTimer(&DeviceExtension->Timer, DueTime, &DeviceObject->Dpc);
|
KeSetTimer(&DeviceExtension->Timer, DueTime, &DeviceObject->Dpc);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue