QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The _SNDPLAYCOPY statement copies a sound, plays it, and automatically closes the copy using a handle parameter passed from _SNDOPEN or _SNDCOPY

Syntax

_SNDPLAYCOPY handle&[, volume!]

Parameter(s)

Description

Example(s)

Playing a previously opened sound at half volume.


_SNDPLAYCOPY applause&, 0.5 

Playing a song at random volumes.

 
chomp& = _SNDOPEN("chomp.wav") 
_SNDPLAYCOPY chomp&, 0.5 + RND * 0.49

See Also