beetlebug▾
/

ztcl::audio cget

Gives an option of the audio engine or of an id.

ztcl::audio cget OPTION
ztcl::audio cget ID OPTION

Description

Gives the value of OPTION of the engine, or of the sound, voice, or pattern ID, as configure with one option does.

Returns

The value.

Examples

% ztcl::audio cget -device
none

% ztcl::audio configure -device offline; set s [ztcl::audio load -wave sine -length 10]; ztcl::audio cget $s -frames
480

% set m [ztcl::audio pattern [list $s {X x x}] -meter 3/4]; ztcl::audio configure $m -gap {4 2}; list [ztcl::audio cget $m -meter] [ztcl::audio cget $m -gap]
3/4 {4 2}

Errors

% ztcl::audio cget sound4 -gain
sound "sound4" doesn't exist
-errorcode TCL LOOKUP AUDIO sound4

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

See also