1. bell
- Posted by gwalters at sc.rr.com Jul 24, 2001
- 380 views
This is a multi-part message in MIME format. ------=_NextPart_000_0043_01C1143A.A80F05A0 charset="Windows-1252" Should this not work? I get no sound from my computer..thanks for your = help global procedure bell() sound(600) sleep(.5) sound(0) end procedure =20 ..george ------=_NextPart_000_0043_01C1143A.A80F05A0 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Dwindows-1252" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.3105.105" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT size=3D2>Should this not work? I get no sound from my = computer..thanks=20 for your help</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>global procedure=20 bell()<BR> sound(600)<BR> sleep(.5)<BR> sound(0)<BR>end=20 procedure </FONT></DIV> <DIV> </DIV> ------=_NextPart_000_0043_01C1143A.A80F05A0--
2. Re: bell
- Posted by irvm at ellijay.com Jul 24, 2001
- 374 views
On Tuesday 24 July 2001 12:17, gwalters at sc.rr.com wrote: > Should this not work? I get no sound from my computer..thanks for your help > > global procedure bell() > sound(600) > sleep(.5) > sound(0) > end procedure It shouldn't even 'compile' - sleep takes an integer. If you change that to sleep(1), it will run on DOS, but not on Windows or Linux. Regards, Irv
3. Re: bell
- Posted by gwalters at sc.rr.com Jul 24, 2001
- 391 views
Thanks, Irv.....I discovered the reqirement for an integer and changed it to 1. It now 'sleeps' for a second but no sound eminates.. Do you know how to simulate a 'bell' on windows? ..george ----- Original Message ----- From: <irvm at ellijay.com> To: "EUforum" <EUforum at topica.com> Subject: Re: bell > > > On Tuesday 24 July 2001 12:17, gwalters at sc.rr.com wrote: > > > Should this not work? I get no sound from my computer..thanks for your help > > > > global procedure bell() > > sound(600) > > sleep(.5) > > sound(0) > > end procedure > > It shouldn't even 'compile' - sleep takes an integer. > > If you change that to sleep(1), it will run on DOS, but not on Windows > or Linux. > > Regards, > Irv > > > >
4. Re: bell
- Posted by irvm at ellijay.com Jul 24, 2001
- 382 views
On Tuesday 24 July 2001 14:27, gwalters at sc.rr.com wrote: >Thanks, Irv.....I discovered the reqirement for an integer and changed it > to 1. It now 'sleeps' for a second but no sound eminates.. Do you know how > to simulate a 'bell' on windows? Try the playSound() routine in Win32lib. It plays wav files, I think. Regards, Irv
5. Re: bell
- Posted by mtsreborn_again at yahoo.com Jul 24, 2001
- 387 views
Hmmm... Well, sometimes the speaker doesn't work as it should. Sound() is a very tricky function to call, not to say crappy. Sometimes your sound keeps playing even when you tell it to stop, etc. But what I'd suggest you'd do, is get rid of 'sleep()' because it's not that usefull for idling the cpu (ie. for doing nothing for some time). What you should do is write a routine like this: procedure wait(atom howlong) atom t t = time() while t+howlong >= time() do end while end procedure And then use it like this: global procedure bell() sound(600) wait(0.5) sound(0) end procedure Why is this better than using sleep() or something? Well, because what if you'd like to do something else while playing the sound? With your own routine you can easily rewrite it to this; procedure wait(atom howlong,sequence proc,sequence args) atom t t = time() while t+howlong >= time() do call_proc(routine_id(proc),args) end while end procedure See? Now you can use it like this: global procedure bell() sound(600) wait(0.5,"renderFrame",{Screen,1,1}) sound(0) end procedure It's calling procedure 'renderFrame' while playing the sound... This would be usefull in a game or simulation... Heh, hope I helped. Mike The Spike > On Tuesday 24 July 2001 12:17, gwalters at sc.rr.com > wrote: > > > Should this not work? I get no sound from my > computer..thanks for your help > > > > global procedure bell() > > sound(600) > > sleep(.5) > > sound(0) > > end procedure > > It shouldn't even 'compile' - sleep takes an > integer. > > If you change that to sleep(1), it will run on DOS, > but not on Windows > or Linux. > > Regards, > Irv > > >
6. Re: bell
- Posted by otter at FULL-MOON.COM Jul 25, 2001
- 375 views
well in the old dos days I'd just print a control-g haven't tried it, but it's worth a shot. At 02:57 PM 07/24/2001 -0400, you wrote: > > > > >On Tuesday 24 July 2001 14:27, gwalters at sc.rr.com wrote: > > >Thanks, Irv.....I discovered the reqirement for an integer and changed it > > to 1. It now 'sleeps' for a second but no sound eminates.. Do you know how > > to simulate a 'bell' on windows? > >Try the playSound() routine in Win32lib. It plays wav files, >I think. > >Regards, >Irv > > > > >
7. Re: bell
- Posted by Robert Craig <rds at RapidEuphoria.com> Jul 25, 2001
- 380 views
George Walters writes: > Do you know how to simulate a 'bell' on windows? The WIN32 API has a "Beep" routine. -- make beep through speakers include dll.e atom lib integer beep lib = open_dll("kernel32.dll") beep = define_c_proc(lib, "Beep", {C_INT, C_INT}) procedure Beep() c_proc(beep, {0, 0}) end procedure Beep() Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
8. Re: bell
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 25, 2001
- 376 views
If you are using win32lib you can do this... atom xMessageBeep, junk xMessageBeep = registerw32Function(user32, "MessageBeep", {C_UINT}, C_UINT) then when you need to make a sound ... junk = w32Func(xMessageBeep, {whichsound}) where 'whichsound' can be one of ... -1 = Standard Beep MB_ICONASTERISK = WAV file assigned to 'Asterisk' MB_ICONEXCLAMATION = WAV file assigned to 'Exclamation' MB_ICONHAND = WAV file assigned to 'Hand' MB_ICONQUESTION = WAV file assigned to 'Question' MB_OK = WAV file assigned to 'Default' You can use the Windows Control Panel to assign WAV files to specific types of sound events. If you are not using win32lib try this... include msgbox.e atom lUser32, xMessageBeep, junk lUser32 = open_dll("user32") xMessageBeep = define_c_func(lUser32, "MessageBeep", {C_UINT}, C_UINT) then when you need to make a sound ... junk = c_func(xMessageBeep, {whichsound}) ----- Original Message ----- From: <otter at FULL-MOON.COM> To: "EUforum" <EUforum at topica.com> Sent: Thursday, July 26, 2001 6:33 AM Subject: Re: bell > > > well in the old dos days I'd just print a control-g > > haven't tried it, but it's worth a shot. > > At 02:57 PM 07/24/2001 -0400, you wrote: > > > > > > > >On Tuesday 24 July 2001 14:27, gwalters at sc.rr.com wrote: > > > > >Thanks, Irv.....I discovered the reqirement for an integer and changed it > > > to 1. It now 'sleeps' for a second but no sound eminates.. Do you know how > > > to simulate a 'bell' on windows? > > > >Try the playSound() routine in Win32lib. It plays wav files, > >I think. > > > >Regards, > >Irv > > > > > > > > > > > > >
9. Re: bell
- Posted by gwalters at sc.rr.com Jul 25, 2001
- 376 views
Brian, it's done on the OS Theos and Theos Basic... www.theos-software.com ...george ----- Original Message ----- From: "Brian Broker" <bkb at cnw.com> To: "EUforum" <EUforum at topica.com> Subject: RE: bell > > > Wow, I remember that from the Apple ][ days {e.g. PRINT CHR$(7) }... I > didn't know you could do that on a PC. What language? > > -- Brian > > > otter wrote: > > well in the old dos days I'd just print a control-g > > > > haven't tried it, but it's worth a shot. > > > > At 02:57 PM 07/24/2001 -0400, you wrote: > > > > > > > > > > >On Tuesday 24 July 2001 14:27, gwalters at sc.rr.com wrote: > > > > > > >Thanks, Irv.....I discovered the reqirement for an integer and changed > > > >it > > > > to 1. It now 'sleeps' for a second but no sound eminates.. Do you know > > > > how > > > > to simulate a 'bell' on windows? > > > > > >Try the playSound() routine in Win32lib. It plays wav files, > > >I think. > > > > > >Regards, > > >Irv > > > > > > > > > > > > > > > > > > > > > >
10. Re: bell
- Posted by gwalters at sc.rr.com Jul 25, 2001
- 381 views
thanks, i'll give it a try... ..george ----- Original Message ----- From: "Robert Craig" <rds at RapidEuphoria.com> To: "EUforum" <EUforum at topica.com> Subject: Re: bell > > > George Walters writes: > > Do you know how to simulate a 'bell' on windows? > > The WIN32 API has a "Beep" routine. > > -- make beep through speakers > include dll.e > > atom lib > integer beep > > lib = open_dll("kernel32.dll") > beep = define_c_proc(lib, "Beep", {C_INT, C_INT}) > > procedure Beep() > c_proc(beep, {0, 0}) > end procedure > > Beep() > > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > > > > > >