Author: hbelusca
Date: Fri Mar 27 00:44:44 2015
New Revision: 66909
URL:
http://svn.reactos.org/svn/reactos?rev=66909&view=rev
Log:
[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.
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c [iso-8859-1] Fri Mar 27
00:44:44 2015
@@ -51,14 +51,14 @@
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