Audio-Beep
view release on metacpan or search on metacpan
beep-1.2.2/beep.c view on Meta::CPAN
#include <linux/kd.h>
/* I don't know where this number comes from, I admit that freely. A
wonderful human named Raine M. Ekman used it in a program that played
a tune at the console, and apparently, it's how the kernel likes its
sound requests to be phrased. If you see Raine, thank him for me.
June 28, email from Peter Tirsek (peter at tirsek dot com):
This number represents the fixed frequency of the original PC XT's
timer chip (the 8254 AFAIR), which is approximately 1.193 MHz. This
number is divided with the desired frequency to obtain a counter value,
that is subsequently fed into the timer chip, tied to the PC speaker.
The chip decreases this counter at every tick (1.193 MHz) and when it
reaches zero, it toggles the state of the speaker (on/off, or in/out),
resets the counter to the original value, and starts over. The end
result of this is a tone at approximately the desired frequency. :)
*/
#ifndef CLOCK_TICK_RATE
#define CLOCK_TICK_RATE 1193180
#endif
#define VERSION_STRING "beep-1.2.2"
lib/Audio/Beep/Linux/PP.pm view on Meta::CPAN
Follows what you can read there:
I don't know where this number comes from, I admit that freely. A
wonderful human named Raine M. Ekman used it in a program that played
a tune at the console, and apparently, it's how the kernel likes its
sound requests to be phrased. If you see Raine, thank him for me.
June 28, email from Peter Tirsek (peter at tirsek dot com):
This number represents the fixed frequency of the original PC XT's
timer chip (the 8254 AFAIR), which is approximately 1.193 MHz. This
number is divided with the desired frequency to obtain a counter value,
that is subsequently fed into the timer chip, tied to the PC speaker.
The chip decreases this counter at every tick (1.193 MHz) and when it
reaches zero, it toggles the state of the speaker (on/off, or in/out),
resets the counter to the original value, and starts over. The end
result of this is a tone at approximately the desired frequency. :)
=head1 BUGS
None known.
=head1 COPYRIGHT
( run in 1.317 second using v1.01-cache-2.11-cpan-49f99fa48dc )