example c program that does "beep"

Anton Shterenlikht mexas at bristol.ac.uk
Sat Dec 26 15:37:41 UTC 2009


On Fri, Dec 25, 2009 at 02:02:19PM -0500, Joe Marcus Clarke wrote:
> On Fri, 2009-12-25 at 18:58 +0000, Anton Shterenlikht wrote:
> > How can I get a beep from c?
> > I looked at curses and syscons.c, but
> > still not clear.
> > Could somebody send me an example.
> > I'd be soooooo grateful.
> 
> #include <stdio.h>
> 
> int
> main(int argc, char **argv) {
>         printf("%c", 7);
>         return(0);
> }

Doesn't seem to do anything. Maybe 
there's something wrong with my sound?
But mp3 player seems to come out ok.
Or maybe I missed something obvious..

thanks a lot
anton

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423


More information about the freebsd-questions mailing list