SysBeep(lenght,frequency)

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by merendo.

Remember the little "Beep" your PC does when you switch it on. Does PureBasic already support playing a beep like this, or am I the first one having this idea? The command can look like this: SysBeep(How long the sound should play -in millisecs-integer,CDEFGABC - Integer as well). This may be useful to code some Console() games for DOS :wink:

We always need to hear both sides of the story (by Phil Collins)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

Beep_( frequency, duration )
is a WinAPI function.

Try it:

Code: Select all

   For a = 0 to 10000 Step 50
      beep_(a, 1) ; change 1 to 100
   Next a
Remarks from MSDN:
Windows95: The Beep function ignores the frequency & duration parameters.
On computers with a sound card, the function plays the default sound event.
On computers without a sound card, the function plays the standard system beep.



cya,
...Danilo

(registered PureBasic user)
Post Reply