aboutsummaryrefslogtreecommitdiff
path: root/sys/pccard
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2002-09-29 23:41:25 +0000
committerWarner Losh <imp@FreeBSD.org>2002-09-29 23:41:25 +0000
commit559e54225b1b18128e4789a323f432ec68796c8c (patch)
treefc30cda06a25fbb615438dbcffe5e98d380f1e4d /sys/pccard
parent521c179f7df8aafb5fdfdd6e312f4b281b19d597 (diff)
downloadsrc-559e54225b1b18128e4789a323f432ec68796c8c.tar.gz
src-559e54225b1b18128e4789a323f432ec68796c8c.zip
Make beep not depend on HZ setting.
PR: 25201 Submitted by: Akio Marita-san # This is the last part of the PR uncommitted.
Notes
Notes: svn path=/head/; revision=104164
Diffstat (limited to 'sys/pccard')
-rw-r--r--sys/pccard/pccard_beep.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/pccard/pccard_beep.c b/sys/pccard/pccard_beep.c
index 4266310644e8..a2baea931312 100644
--- a/sys/pccard/pccard_beep.c
+++ b/sys/pccard/pccard_beep.c
@@ -73,8 +73,9 @@ pccard_beep_sub(void *arg)
melody = (struct tone *)arg;
if (melody->pitch != 0) {
- sysbeep(melody->pitch, melody->duration);
- timeout(pccard_beep_sub, melody + 1, melody->duration);
+ sysbeep(melody->pitch, (melody->duration * hz + 99) / 100);
+ timeout(pccard_beep_sub, melody + 1,
+ (melody->duration * hz + 99) / 100);
} else
allow_beep = BEEP_ON;
}
@@ -87,8 +88,9 @@ pccard_beep_start(void *arg)
if (allow_beep == BEEP_ON && melody->pitch != 0) {
allow_beep = BEEP_OFF;
- sysbeep(melody->pitch, melody->duration);
- timeout(pccard_beep_sub, melody + 1, melody->duration);
+ sysbeep(melody->pitch, (melody->duration * hz + 99) / 100);
+ timeout(pccard_beep_sub, melody + 1,
+ (melody->duration * hz + 99) / 100);
}
}