mirror of
https://github.com/QB64Official/qb64.git
synced 2024-08-22 11:25:08 +00:00
24 lines
550 B
Markdown
24 lines
550 B
Markdown
The [_SNDVOL](_SNDVOL) statement sets the volume of a sound loaded in memory using a handle from the [_SNDOPEN](_SNDOPEN) function.
|
|
|
|
## Syntax
|
|
|
|
> [_SNDVOL](_SNDVOL) handle&, volume!
|
|
|
|
## Description
|
|
|
|
* volume! is a value from 0 (silence) to 1 (full volume).
|
|
* In versions **prior to build 20170811/60**, the sound identified by handle& must have been opened using the [_SNDOPEN](_SNDOPEN) to use this function.
|
|
|
|
## Example(s)
|
|
|
|
```vb
|
|
|
|
h& = _SNDOPEN("bell.wav")
|
|
_SNDVOL h&, 0.5
|
|
_SNDPLAY h&
|
|
|
|
```
|
|
|
|
## See Also
|
|
|
|
* [_SNDOPEN](_SNDOPEN), [_SNDBAL](_SNDBAL)
|