1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-01 09:10:37 +00:00
qb64/internal/help/_SNDVOL.txt
2019-04-14 22:15:33 -03:00

27 lines
708 B
Plaintext

{{DISPLAYTITLE:_SNDVOL}}
The [[_SNDVOL]] statement sets the volume of a sound loaded in memory using a handle from the [[_SNDOPEN]] function.
{{PageSyntax}}
: [[_SNDVOL]] {{Parameter|handle&}}, {{Parameter|volume!}}
{{PageDescription}}
* {{Parameter|volume!}} is a value from 0 (silence) to 1 (full volume).
* In versions '''prior to build 20170811/60''', the sound identified by {{Parameter|handle&}} must have been opened using the [[_SNDOPEN|"VOL" capability]] to use this function.
{{PageExamples}}
{{CodeStart}} '' ''
h& = {{Cl|_SNDOPEN}}("bell.wav")
{{Cl|_SNDVOL}} h&, 0.5
{{Cl|_SNDPLAY}} h& '' ''
{{CodeEnd}}
{{PageSeeAlso}}
*[[_SNDOPEN]], [[_SNDBAL]]
{{PageNavigation}}