This is the mail archive of the
mailing list for the Cygwin project.
Re: Does "^G" work on Windows 9x/Me?
- From: ericblake at comcast dot net (Eric Blake)
- To: cygwin at cygwin dot com
- Date: Wed, 04 Jan 2006 04:17:44 +0000
- Subject: Re: Does "^G" work on Windows 9x/Me?
> Neither Corinna nor I have a real machine running Windows 98 any more
> so we can't easily test to see if echoing a CTRL-G to a console window
> running bash (or any other cygwin shell) actually does anything. Can
> anyone confirm if this actually plays a beep?
My experience with Win98 is that both before and after the patch,
snapshots 20051229 and 20060103 12:55:23, the command
"printf '\a%1000s\a' 1" produced two tweets on the motherboard
speaker (which is rather faint to hear since I keep my box underneath
the desk), rather than playing a .wav file on my speakers which
are located on my desk. Yes, my 266MHz box is slow enough that
printing one thousand characters had enough noticeable I/O delay
that I could distinguish between the two beeps. I would much
rather hear a .wav file, though (or not hear, as the case may be,
when I mute my desktop speakers - there is no way to mute the
> A worrying note is that I get a sound in my vmware session when I
> test the default beep under Control Panel but I don't hear anything
> when I echo a CTRL-G under bash. I also can't get any sound from
> MessageBeep (-1) using the below program. Other sounds played ok
> but not MessageBeep (-1), which is what Cygwin uses.
> #include <windows.h>
> #include <stdlib.h>
> main (int argc, char **argv)
> int beep = *++argv ? atoi (*argv) : -1;
> MessageBeep (beep);
I had similar results; -1 just hit the motherboard, but 0-15 gave
the default .wav that I hear from other apps, 16-31 gave the
typical error .wav, etc. In fact, changing control panel, sounds,
Windows:Default sound had an effect on the test app when called
with argument 0, and changed the contents of
Maybe Win9x needs to use MessageBeep(0) to play a .wav.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html