Does "^G" work on Windows 9x/Me?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Does "^G" work on Windows 9x/Me?

Christopher Faylor-2
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?

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 <windows.h>
#include <stdlib.h>

int
main (int argc, char **argv)
{
  int beep = *++argv ? atoi (*argv) : -1;
  MessageBeep (beep);
}


--
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/

Reply | Threaded
Open this post in threaded view
|

Re: Does "^G" work on Windows 9x/Me?

Ingo Brueckl
Christopher Faylor writes:

> Can anyone confirm if this actually plays a beep?

Windows 98SE here. Unfortunately, since I have the soundcard, my console beep
has become a kind of crackle, but I can confirm that it crackles with

  echo -e "\007"

as well as with MessageBeep (-1) using the program you posted.

Ingo


--
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/

Reply | Threaded
Open this post in threaded view
|

Re: Does "^G" work on Windows 9x/Me?

Eric Blake-2
In reply to this post by Christopher Faylor-2
> 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 <windows.h>
> #include <stdlib.h>
>
> 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/

Reply | Threaded
Open this post in threaded view
|

Re: Does "^G" work on Windows 9x/Me?

Christopher Faylor-2
On Wed, Jan 04, 2006 at 04:17:44AM +0000, Eric Blake wrote:

>> 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).

The patch shouldn't have had an effect on a working installation so I'm
glad that there is not change in the recent snapshot.

Apparently, Windows 9x defaults to the system speaker no matter what.
How very surprising that this would be inconsistent.  What. are. the. odds?

>Maybe Win9x needs to use MessageBeep(0) to play a .wav.

In theory, MessageBeep(-1) will try to play a sound, and if that fails,
revert to the system speaker.  Other sounds are not documentated to work
that way.  Otherwise, I probably would just change Cygwin to use 0 since
this is supposed to play the default sound.  Or, we could even use our
own nifty .wav file.

I don't think that it's acceptable for there to sometimes be *no* sound
since you never know when the sound could disappear and, if you are
relying on an audible beep, it could be pretty annoying not to get one.
That's why I just want this to always work rather than having a
something, like cygcheck, which could be run when you think of it (to
answer Gary's question).

Corinna and I discussed making this more flexible and introducing a
visible alert but I don't want to destabilize 1.5.19 at this point since
we are hopefully close to a release.  I just wanted this to work the
way it was supposed to work.

cgf


--
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/

Reply | Threaded
Open this post in threaded view
|

Re: Does "^G" work on Windows 9x/Me?

Christopher Faylor-2
On Tue, Jan 03, 2006 at 11:36:16PM -0500, Christopher Faylor wrote:

>On Wed, Jan 04, 2006 at 04:17:44AM +0000, Eric Blake wrote:
>>> 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).
>
>The patch shouldn't have had an effect on a working installation so I'm
>glad that there is not change in the recent snapshot.
>
>Apparently, Windows 9x defaults to the system speaker no matter what.
>How very surprising that this would be inconsistent.  What. are. the. odds?
>
>>Maybe Win9x needs to use MessageBeep(0) to play a .wav.
>
>In theory, MessageBeep(-1) will try to play a sound, and if that fails,
                                                    ^
                                           via a sound card


--
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/

Reply | Threaded
Open this post in threaded view
|

Re: Does "^G" work on Windows 9x/Me?

Christopher Faylor-2
In reply to this post by Christopher Faylor-2
On Tue, Jan 03, 2006 at 11:36:16PM -0500, Christopher Faylor wrote:

>On Wed, Jan 04, 2006 at 04:17:44AM +0000, Eric Blake wrote:
>>> 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).
>
>The patch shouldn't have had an effect on a working installation so I'm
>glad that there is not change in the recent snapshot.
>
>Apparently, Windows 9x defaults to the system speaker no matter what.
>How very surprising that this would be inconsistent.  What. are. the. odds?
>
>>Maybe Win9x needs to use MessageBeep(0) to play a .wav.
>
>In theory, MessageBeep(-1) will try to play a sound, and if that fails,
>revert to the system speaker.  Other sounds are not documentated to work
>that way.  Otherwise, I probably would just change Cygwin to use 0 since
>this is supposed to play the default sound.  Or, we could even use our
>own nifty .wav file.

Sorry to follow up twice on my own message but, I should have read further
in the MessageBeep description.  It is documented as reverting to the
system speaker in all cases if the sound could not be played on a sound
card.

So, maybe I will just cause the system to use MessageBox(MB_OK) aka
MessageBox(0).

cgf


--
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/

Reply | Threaded
Open this post in threaded view
|

Re: Does "^G" work on Windows 9x/Me?

Eric Blake-2
In reply to this post by Christopher Faylor-2
>
> Sorry to follow up twice on my own message but, I should have read further
> in the MessageBeep description.  It is documented as reverting to the
> system speaker in all cases if the sound could not be played on a sound
> card.

Indeed - on Win98, when I disable the default sound altogether (in
other words, HKCU/AppEvents/Schemes/Apps/.Default/.Default.current/@
is now zero-length), then MessageBeep(MB_OK) did indeed fall back to the
same faint motherboard beep that I was always getting from MessageBeep(-1).

>
> So, maybe I will just cause the system to use MessageBox(MB_OK) aka
> MessageBox(0).

I think you mean MessageBeep, not MessageBox.

Well, MSDN did document that on NT 4.0, MessageBeep(-1) calls Beep(), which
forwards on to the client, whereas all other message beep parameters are
not forwarded (but talk about confusing language to read).

--
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/

Reply | Threaded
Open this post in threaded view
|

Re: Does "^G" work on Windows 9x/Me?

Joe Smith-10
In reply to this post by Christopher Faylor-2

>
> So, maybe I will just cause the system to use MessageBox(MB_OK) aka
> MessageBox(0).
 MessageBox???



--
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/

Reply | Threaded
Open this post in threaded view
|

Re: Does "^G" work on Windows 9x/Me?

Christopher Faylor-2
On Wed, Jan 04, 2006 at 06:21:11PM -0500, Joe Smith wrote:
>>So, maybe I will just cause the system to use MessageBox(MB_OK) aka
>>MessageBox(0).
>MessageBox???

YA observed trend for the new year - not reading the full email thread
before spasmodically typing in a reply.

Only in the cygwin list would a simple typo require two comments.

There must be something in the water.

cgf


--
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/

Reply | Threaded
Open this post in threaded view
|

RE: Does "^G" work on Windows 9x/Me?

Gary R. Van Sickle
In reply to this post by Joe Smith-10
> From: Joe Smith
> Sent: Wednesday, January 04, 2006 5:21 PM
> To: [hidden email]
> Subject: Re: Does "^G" work on Windows 9x/Me?
>
>
> >
> > So, maybe I will just cause the system to use MessageBox(MB_OK) aka
> > MessageBox(0).
>  MessageBox???
>

He of course meant "MustardBox(MB_PLOCHMANNS)", Mr. Picky.

;-)

--
Gary R. Van Sickle



--
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/

Reply | Threaded
Open this post in threaded view
|

RE: Does "^G" work on Windows 9x/Me?

Dave Korn
In reply to this post by Christopher Faylor-2
Christopher Faylor wrote:
> On Wed, Jan 04, 2006 at 06:21:11PM -0500, Joe Smith wrote:
>>> So, maybe I will just cause the system to use MessageBox(MB_OK) aka
>>> MessageBox(0).
>> MessageBox???
>
> YA observed trend for the new year - not reading the full email thread
> before spasmodically typing in a reply.

  ITYM "http://cygwin.com/acronyms#YSHFRTT", no?

> Only in the cygwin list would a simple typo require two comments.
>
> There must be something in the water.

  Well, yes.  Of course.  Hippos.


    cheers,
      DaveK
--
Can't think of a witty .sigline today....



--
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/