Microsoft KB Archive/45053

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 16:56, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


BUG: Zero Frequency Still Plays SOUND in Macintosh QuickBasic

Article ID: 45053

Article Last Modified on 11/21/2006

This article was previously published under Q45053

SYMPTOMS

The SOUND statement for Macintosh QuickBasic 1.00 will incorrectly play a very low sound if it is passed a frequency of 0. The syntax for the SOUND statement is as follows:

SOUND frequency,duration,volume,voice


Setting the frequency parameter to zero should either produce an "illegal function call" error message or not produce any sound.

To demonstrate the problem, use the following code example. Make sure the volume is set to high in the Control Panel in the Apple menu:

   PRINT "TYPE Q OR q TO QUIT"
   A$ = INKEY$
   WHILE NOT((A$ = "Q") OR (A$ = "q"))
      A$ = INKEY$
      SOUND 0,1,0
   WEND
   END
                


Additional query words: MQuickB

Keywords: kbbug KB45053