mirror of
https://github.com/QB64Official/qb64.git
synced 2024-08-29 20:30:48 +00:00
25 lines
600 B
Text
25 lines
600 B
Text
|
The {{KW|_SNDVOL}} statement sets the volume of a sound using a handle from the {{KW|_SNDOPEN}} Function.
|
||
|
|
||
|
|
||
|
{{PageSyntax}}
|
||
|
:{{KW|_SNDVOL}} ({{Parameter|handle&}}, {{Parameter|volume!}})
|
||
|
|
||
|
|
||
|
{{PageDescription}}
|
||
|
*Volume is a value from 0 (silence) to 1 (full volume).
|
||
|
*An opened sound file must have the "VOL" capability to use this function.
|
||
|
|
||
|
|
||
|
{{PageExamples}}
|
||
|
{{CodeStart}} '' ''
|
||
|
h& = {{Cl|_SNDOPEN}}("bell.wav", "SYNC,VOL")
|
||
|
{{Cl|_SNDVOL}} h&, 0.5
|
||
|
{{Cl|_SNDPLAY}} h& '' ''
|
||
|
{{CodeEnd}}
|
||
|
|
||
|
|
||
|
{{PageSeeAlso}}
|
||
|
*{{KW|_SNDOPEN}}, {{KW|_SNDBAL}}
|
||
|
|
||
|
|
||
|
{{PageNavigation}}
|