X-Spam-Check-By: sourceware.org From: ericblake AT comcast DOT net (Eric Blake) To: cygwin AT cygwin DOT com Subject: Re: Does "^G" work on Windows 9x/Me? Date: Wed, 04 Jan 2006 04:17:44 +0000 Message-Id: <010420060417.19001.43BB4C68000220B300004A3922007510900A050E040D0C079D0A@comcast.net> 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 > 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 motherboard speaker). > > 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. > > cgf > > #include > #include > > int > 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 /proc/registry/HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/.Default/.current/@. Maybe Win9x needs to use MessageBeep(0) to play a .wav. -- Eric Blake -- 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/