Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Sat, 20 Mar 2004 22:49:16 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: Re: Beep or playing a sound [Attn: CGF] In-Reply-To: <20040321010346.GA11477@redhat.com> Message-ID: References: <405B8780 DOT 9030904 AT sun DOT com> <20040321010346 DOT GA11477 AT redhat DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 On Sat, 20 Mar 2004, Christopher Faylor wrote: > On Fri, Mar 19, 2004 at 09:52:12PM -0500, Igor Pechtchanski wrote: > >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. > > > >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... > > echo "^G" > > where ^G is the literal "control g" character works fine for me. ^G > uses the Windows MessageBeep call so if that isn't working then there > are undoubtedly other things wrong with your system. Either that or you > have sound muted. > > cgf MessageBeep in general does not work on my system (even from a non-Cygwin program). There used to be a "DefaultBeep" event in Windows that had a sound associated with it -- that was the sound that MessageBeep used. I don't know why there is no such event now, but there isn't. I did have to install a service pack and some hotfixes recently, so I suspect they had removed this somehow. In any case, the sound is not muted, and the Beep() call works. I did not say the MessageBeep approach was wrong for everyone, I just said it doesn't work on some systems. Apparently it does in yours. I'll investigate... Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT 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/