ztcl::audio volume
Gives or sets the volume of a sound.
ztcl::audio volume HANDLE ?VALUE?
Description
With no VALUE, gives the volume of the sound of HANDLE. With VALUE, from 0.0 to 1.0, sets it and gives it. A sound that ended has no volume.
Returns
The volume.
Examples
# No sound has that handle.
% catch {ztcl::audio volume audio4} msg; set msg
no sound "audio4"
Errors
% ztcl::audio volume audio4
no sound "audio4"
-errorcode ZTCL AUDIO HANDLE
% ztcl::audio volume x1
bad handle "x1"
-errorcode ZTCL AUDIO HANDLE
Facts
- Capability
audio. A new interpreter does not have it until the host turns it on.- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.6