Add new comment
rockin' PC speaker
Well,
good old PC speaker is the only default hardware, easily available on
almost all PC systems, and virtually unmuteable (actually, one can
connect PC speaker output to his/her sound card instead of default
buzzer, but this rarely happens
. Thus, it is perfect for
communicating critical states. But the default system beep is quite
boring, and makes difficult to distinguish different events that are
being communicated. So, here's my humble attempt to make a highly
portable function that is able to play simple non-polyphonic music on
the PC speaker. I used it originally to advise when someone tried to
log in to my system through SSH daemon (thus the name "daemoniac" -
. It was tested (and worked fine!) under:
. Thus, it is perfect for
communicating critical states. But the default system beep is quite
boring, and makes difficult to distinguish different events that are
being communicated. So, here's my humble attempt to make a highly
portable function that is able to play simple non-polyphonic music on
the PC speaker. I used it originally to advise when someone tried to
log in to my system through SSH daemon (thus the name "daemoniac" - demoniac
. It was tested (and worked fine!) under:
- DOS (DJGPP, Turbo C)
- Windows 9x/NT/2K/XP (Borland C, Microsoft Visual C, MinGW)
- Linux (gcc)
- FreeBSD (gcc)
demoniac will play Iron Maiden - Fear Of The Dark beginning. You can also compile it to play the simple "A#4 D#5 G5 A#5 G5 A#5" melody. Note that on UN*X systems, demoniac accesses hardware directly, and thus requires to run as root user. It's safe, through: it
won't accept any command line arguments and neither process environment
variables, so, at least, it can't be exploited with some buffer
overflow technique. For detailed instructions about compiling demoniac on
different compilers/systems, read the comments at the start of the
source. Note that my package provides all the binaries generated on
compilers/systems listed above.stas » April 20, 2006 » 02:06
attachment » add new comment » 3414 reads
