mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[NTVDM]: In case some app sends repeatedly beeps of Frequency == 0 (to stop beeping) but with Duration == INFINITY, do the duration fixup before actually checking whether our previous beep was the same, so that we don't saturate the beep driver with beep stop IRQ requests (Windows seems to handle that properly but ReactOS seems to do not, and the real problem seems to lie in NTOS kernel and not in the beep driver, because the same problem happens even when using windows' beep.sys in ROS). Patch by Aleksander, tested by both of us.
svn path=/trunk/; revision=66909
This commit is contained in:
parent
c31066bab6
commit
daa8b930bc
1 changed files with 3 additions and 3 deletions
|
@ -51,15 +51,15 @@ MakeBeep(ULONG Frequency,
|
|||
IO_STATUS_BLOCK IoStatusBlock;
|
||||
BEEP_SET_PARAMETERS BeepSetParameters;
|
||||
|
||||
/* A null frequency means we stop beeping */
|
||||
if (Frequency == 0) Duration = 0;
|
||||
|
||||
/*
|
||||
* Do nothing if we are replaying exactly the same sound
|
||||
* (this avoids hiccups due to redoing the same beeps).
|
||||
*/
|
||||
if (Frequency == LastFrequency && Duration == LastDuration) return;
|
||||
|
||||
/* A null frequency means we stop beeping */
|
||||
if (Frequency == 0) Duration = 0;
|
||||
|
||||
/*
|
||||
* For small durations we automatically reset the beep so
|
||||
* that we can replay short beeps like clicks immediately.
|
||||
|
|
Loading…
Reference in a new issue