example c program that does "beep"

Polytropon freebsd at edvax.de
Sat Dec 26 19:08:56 UTC 2009


On Sat, 26 Dec 2009 17:16:23 +0000, Anton Shterenlikht <mexas at bristol.ac.uk> wrote:
> On Sat, Dec 26, 2009 at 11:50:06AM -0500, Thomas Dickey wrote:
> > 
> > instead of the printf/fflush, it would clear the screen and beep - if the
> > terminal description says it can do the beep.

The exanple I posted displays the return code of the functions,
which is of (int) type. Of course, the common way to use them
is to just call beep(); and it should beep if the terminal can
do it.



> I have 
> 
> > echo $TERM
> xterm
> >
> 
> xterm can do beep, can't it?

It can. I've just checked from within the xterm terminal
emulator. Are you possibly using Konsole or the Gnome
terminal program, or rxvt? In fact, it shouldn't matter.



> But I can't get it to beep on anything.
> I probably don't get some basic idea..

You're sure that yu haven't turned beeping completely off
with some xset call?

As far as I remember, for simple beeping, the speaker
device (device SPEAKER or speaker_load="YES") isn't
required.

Maybe some wild mixer-settings?




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list