This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Beep or playing a sound [Attn: CGF]
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: Edwin Goei <Edwin dot Goei at Sun dot COM>
- Cc: cygwin at cygwin dot com
- Date: Fri, 19 Mar 2004 21:52:12 -0500 (EST)
- Subject: Re: Beep or playing a sound [Attn: CGF]
- References: <405B8780.9030904@sun.com>
- Reply-to: cygwin at cygwin dot com
On Fri, 19 Mar 2004, Edwin Goei wrote:
> Is there a program that will beep or make a sound in cygwin? In bash,
> I've tried "echo -e \\a" and I get a control-G char but no sound. Is
> there a program that will play a sound file that comes w/ cygwin? I run
> xemacs which does produce sounds but I'm looking for a simpler way.
>
> -Edwin
Edwin,
The ^G character will work in an xterm or rxvt running under X11.
It also used to work in the Cygwin console, but apparently doesn't
anymore... Neither does it work in a W11 rxvt. Looking at the code for
the console handler, the processing the BEL character calls the
MessageBeep function (which, in turn, relies on the sound assigned to the
"Default Beep" event). FWIW, I've just verified on my Win2k, and there
doesn't seem to be such an event anymore (and a pure Windows program
calling MessageBeep(0xFFFFFFFF) doesn't result in any sounds). Perhaps
one of the hotfix patches or service packs removed it... Maybe we should
go back to the old way (i.e., call Beep (412, 100), which does work)...
Note that W11's XBell also calls MessageBeep()...
Oh well, there's always 'cat `cygpath -W`/Media/ding.wav > /dev/dsp'. ;-)
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/