[TAG] audio ping
Ben Okopnik
ben at linuxgazette.net
Sun Jan 4 02:37:40 MSK 2009
On Sat, Jan 03, 2009 at 11:55:44AM +0530, shirish wrote:
> Hi all,
> I read the whole thread at
> http://linuxgazette.net/158/misc/lg/2_cent_tip__audio_ping.html but
> would like to know how to do two things.
>
> a. How to turn on/make audio beeps louder
In the same way that you would make them louder for any other use: set
the volume higher. Once that's at maximum, the only way you could get
any louder is with additional hardware: you could get a bigger speaker
(be sure to match the impedance), or connect an amplifier driving an
external speaker. Depending on the amp's output capacity, you could have
a beep that can knock down small buildings; the sky is the limit.
> b. How do you associate the .wav files so that instead of the audio beeps
> I get the .wav file.
The answer - or something like it - is contained in the very next tip
(http://linuxgazette.net/158/lg_tips.html#2_cent_tip__hostwatch). The
script I wrote will beep when there's no connection between the two
hosts; removing the '\007' from the 'echo' line and adding a line that
plays your .wav file would work just fine.
```
until fping -c 1 "$1">/dev/null 2>&1
do
aplay Sonar_ping.wav
echo -e "Connection to '$1' is DOWN."
sleep 1
done
'''
Depending on the time it takes to play that sound, you might also want
to adjust the sleep interval in that loop.
--
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
More information about the TAG
mailing list