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
This commit is contained in:
brian 2007-06-04 09:27:13 +00:00
parent 287d4ad6fa
commit e40209916c

View File

@ -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':