Q21835: Last SOUND Truncated at End of Program
Article: Q21835 Product(s): See article Version(s): 1.00 1.01 1.02 2.00 2.01 3.00 4.00 4.00b 4.50 Operating System(s): MS-DOS Keyword(s): ENDUSER | | mspl13_basic Last Modified: 28-DEC-1989 Question: When I put SOUND statements at the end of the program and run the .EXE file, why is the sound truncated at the end? Response: When a program ends, the BASIC run-time system is exited, which immediately stops any SOUND whose duration exceeds the time taken to execute any remaining statements in the program. If you have QuickBASIC Version 2.00 or later, the problem will not occur in the editor environment, because the run-time system is still available. To give the program time to complete its SOUND statements, give the program something to do after the SOUND (a dummy loop for example) so that the SOUND has time to finish before the program terminates.
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.