Is beep zero-based?

Scott Raney raney at metacard.com
Sun Jun 8 12:29:00 EDT 2003


On Sun, 8 Jun 2003 Dar Scott <dsc at swcp.com> wrote:

> On Sunday, June 8, 2003, at 12:30 AM, valetia at mac.com wrote:
> 
> > The transcript dictionary explains it like this:
> >
> > Cross-platform note:  Windows and OS X do not execute the beep command 
> > if
> > it’s issued while a beep is playing. This means that if you specify a
> > numberOfTimes on a Windows or OS X system, the user might hear fewer 
> > beeps
> > because not all of them are sent to the speaker. To ensure that the 
> > user
> > hears a specific number of beeps, use a loop with a wait command after 
> > each
> > beep:
> >
> >   repeat for 4 times -- ensure 4 separate beeps
> >     beep
> >     wait 200 milliseconds
> >   end repeat
> 
> Translation:
> 
>       This bug is at such a low priority,
>       it is not scheduled to be fixed,
>       so the burden falls to the documentation writer
>       to cheerfully rationalize it away.
> 
>       The programmer's time is valuable,
>       and the tech writer's time is, too.
>       But, it is clear to the whole world
>       that the programer's time is more so.
> 
>       The user's time is not even considered.

Not that inter-vendor finger pointing is going to add much to your
poem, but you need to add another stanza where it reveals that at
least on Win32 systems the bug is really in the OS, and so there ain't
a damn thing we can do about it:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/beep.asp
I.e., the doc says the call is synchronous, but as it turns out it is
really not unless the system is configured to use the system speaker
instead of the system alert sound.  Of course this also means that the
workaround script above won't even work if the user has set the system
alert sound to be something long.  Bottom line: if you really need to
do multiple beeps (not a nice thing to do to your users anyway IMHO),
you probably should be making your own alert sound and play that
instead of using the system beep.
  Regards,
    Scott

> Dar Scott
> awful poet

********************************************************
Scott Raney  raney at metacard.com  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...




More information about the use-livecode mailing list