Futurebasic/Language/Reference/sound snd

Description
This statement plays a synthesized sound which is in the "snd" format. The  parameter identifies the sound you want to play; you can construct this string in any of the following ways:


 * By resource name: Set  to the name of an " " resource in a currently open resource file. Don't use a resource name that begins with "%" or with "&amp;", or it will be confused with the other forms discussed below.
 * By resource ID number: If  is the resource ID number of an " " resource in a currently open resource file, you can prefix the number with a percent sign:


 * By " " handle: If  is a handle to a sound in " " format, you can construct the   parameter as follows:

If FB needs to load a resource to play the sound, it does not automatically release the resource after the sound stops. In this case, you should either use purgeable " " resources, or you should execute the  statement to force the resource to be released.

Sounds played using the  statement are always played asynchronously; that is, your program continues to the next statement immediately, while the sound is playing in the background. However, if you execute a second  statement while a previous sound is still playing in the background, the new sound won't start playing until the first sound finishes.

Example
If you want your program to "wait" until a sound finishes before continuing, you can use the function: