diff options
author | brian <brian@FreeBSD.org> | 2007-06-04 09:27:13 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2007-06-04 09:27:13 +0000 |
commit | e40209916cb59e0b7779db19d3699c409aa9f780 (patch) | |
tree | e4a1aa38bd6536974538b62e4551a65c870dff41 /sys/dev/speaker/spkr.c | |
parent | 287d4ad6fa19ca70b87fe8dcea133bc228004dda (diff) | |
download | FreeBSD-src-e40209916cb59e0b7779db19d3699c409aa9f780.zip FreeBSD-src-e40209916cb59e0b7779db19d3699c409aa9f780.tar.gz |
Now that tone & delay times are correct (independent of hz), adjust
playtone() so that it uses times of 1/100ths of a second.
Now 'time echo T60ABC >/dev/speaker' takes ~3 seconds.
MFC after: 2 weeks
Problem noted by: dwmalone
Diffstat (limited to 'sys/dev/speaker/spkr.c')
-rw-r--r-- | sys/dev/speaker/spkr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index b12314e..4ab065e 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -201,7 +201,7 @@ static void playinit() { octave = DFLT_OCTAVE; - whole = (hz * SECS_PER_MIN * WHOLE_NOTE) / DFLT_TEMPO; + whole = (100 * SECS_PER_MIN * WHOLE_NOTE) / DFLT_TEMPO; fill = NORMAL; value = DFLT_VALUE; octtrack = FALSE; @@ -410,7 +410,7 @@ playstring(cp, slen) GETNUM(cp, tempo); if (tempo < MIN_TEMPO || tempo > MAX_TEMPO) tempo = DFLT_TEMPO; - whole = (hz * SECS_PER_MIN * WHOLE_NOTE) / tempo; + whole = (100 * SECS_PER_MIN * WHOLE_NOTE) / tempo; break; case 'M': |