SNDVOL: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
(Created page with "{{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 "VOL" capability to use...") |
No edit summary |
||
Line 13: | Line 13: | ||
{{PageExamples}} | {{PageExamples}} | ||
{{CodeStart}} | {{CodeStart}} | ||
h& = {{Cl|_SNDOPEN}}("bell.wav") | h& = {{Cl|_SNDOPEN}}("bell.wav") | ||
{{Cl|_SNDVOL}} h&, 0.5 | {{Cl|_SNDVOL}} h&, 0.5 | ||
{{Cl|_SNDPLAY}} h& | {{Cl|_SNDPLAY}} h& | ||
{{CodeEnd}} | {{CodeEnd}} | ||
Line 25: | Line 25: | ||
{{PageNavigation}} | {{PageNavigation}} | ||
[[Category:Latest]] |
Revision as of 08:05, 8 July 2022
The _SNDVOL statement sets the volume of a sound loaded in memory using a handle from the _SNDOPEN function.
Syntax
- _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 "VOL" capability to use this function.
Examples
h& = _SNDOPEN("bell.wav") _SNDVOL h&, 0.5 _SNDPLAY h& |
See also