Bug? WindowsVM or other problem?
Jimmie Houchin
jhouchin at texoma.net
Wed Feb 6 16:14:10 UTC 2002
Andreas Raab wrote:
> Jimmie,
>
> That's an interesting problem. On Windows, #beep is asynchronous,
> meaning that you're starting the same sound at (almost) exactly the same
> time which is why you don't hear them separately. You could check what
> the following does on the Mac vs. Windows:
>
> [10 timesRepeat:[Smalltalk beep]] timeToRun.
>
> On my machine (XP) it returns after 10 milliseconds. BTW, there's a good
> reason for this behavior - you can have any "beep" sound you want and so
> waiting for the beep to be played would waste a lot of time during which
> we could do a lot of useful processing. The following, however, should
> work no matter where you are:
On my PC at work PII 266, WinME it returns a 2. I guess that's 2
milliseconds?
On my rev. B iMac (G3 233mhz) it returns 1745.
But it does what I naively expect.
Tremendous difference.
> 10 timesRepeat:[
> Smalltalk beep.
> (Delay forSeconds: 1) wait.
> ].
>
> Since it will wait for a second inbetween the beeps you will hear them
> all (it's just gonna take ten seconds ;-)
Yes.
Thanks,
Jimmie Houchin
[snip]
More information about the Squeak-dev
mailing list
|