Tux

...making Linux just a little more fun!

Talkback:158/lg_tips.html

[ In reference to "2-Cent Tips" in LG#158 ]

shirish [shirishag75 at gmail.com]


Sat, 3 Jan 2009 11:55:44 +0530

Hi all, I read the whole thread at https://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

b. How do you associate the .wav files so that instead of the audio beeps I get the .wav file.

Thanx in advance.

-- 
          Regards,
          Shirish Agarwal
  This email is licensed under https://creativecommons.org/licenses/by-nc/3.0/
https://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Sat, 3 Jan 2009 18:37:40 -0500

On Sat, Jan 03, 2009 at 11:55:44AM +0530, shirish wrote:

> Hi all,
>        I read the whole thread at
> https://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 (https://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 * https://LinuxGazette.NET *


Top    Back