BEEP: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
(Add v4.0.0 specific changes)
No edit summary
 
Line 1: Line 1:
{{DISPLAYTITLE:BEEP}}
The '''BEEP''' statement produces a beep sound through the sound card.
The '''BEEP''' statement produces a beep sound through the sound card.




{{PageSyntax}}
{{PageSyntax}}
: '''BEEP'''
: [[BEEP]]




Line 15: Line 14:
<!-- QB64 = a version or none, QBPE = a version or all, Platforms = yes or no -->
<!-- QB64 = a version or none, QBPE = a version or all, Platforms = yes or no -->
<gallery widths="48px" heights="48px" mode="nolines">
<gallery widths="48px" heights="48px" mode="nolines">
File:Qb64.png|'''all'''
File:Qb64.png|'''v0.610'''
File:Qbpe.png|'''all'''
File:Qbpe.png|'''all'''
File:Apix.png
File:Apix.png
Line 23: Line 22:
</gallery>
</gallery>
<!-- additional availability notes go below here -->
<!-- additional availability notes go below here -->
* Older programs may attempt to produce a beep by printing [[CHR$]](7) to the screen. This functionality is no longer supported in QB64 after '''version 1.000'''.
* There used to be the ability to produce a beep by printing [[CHR$]](7) to the screen. This functionality was no longer available since '''QB64 v0.960''', when SDL audio was exchanged by OpenAL audio.
** To maintain the legacy functionality, you may need to replace instances of [[PRINT]] [[CHR$]](7) in older programs with the '''BEEP''' statement.
* In '''QB64-PE v4.0.0''' the beeping functionality using [[PRINT]] [[CHR$]](7) has been restored.
* QB64-PE v4.0.0 restores beeping functionality using [[PRINT]] [[CHR$]](7).




{{PageSeeAlso}}
{{PageSeeAlso}}
* [[SOUND]], [[PLAY]]
* [[SOUND]], [[PLAY]]
* [[_SNDPLAY]] {{Text|(play sound files)}}
* [[_SNDPLAY]], [[_SNDRAW]]
* [[_SNDRAW]] {{Text|(play frequency waves)}}




{{PageNavigation}}
{{PageNavigation}}

Latest revision as of 19:26, 22 November 2024

The BEEP statement produces a beep sound through the sound card.


Syntax

BEEP


Description

  • The BEEP statement can be used anywhere in the code to alert the user that there is something to attend to or an error has occurred.
  • QB64 produces the actual "beep" sound through the PC's sound card, emulating QBasic's beeping through the PC speaker.


Availability

  • There used to be the ability to produce a beep by printing CHR$(7) to the screen. This functionality was no longer available since QB64 v0.960, when SDL audio was exchanged by OpenAL audio.
  • In QB64-PE v4.0.0 the beeping functionality using PRINT CHR$(7) has been restored.


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link