ztcl::audio session
Gives or sets the audio session.
ztcl::audio session ?KIND?
Description
With no KIND, gives the audio session of the interpreter: ambient until a script sets another one. With KIND, sets the session of the app and gives it: ambient mixes with the audio of other apps and follows the silent switch, playback plays with the switch on, and solo stops the audio of other apps (the audio focus of Android).
Arguments
| Argument | Type | Default | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| KIND | word | required | The session.
|
Returns
The session.
Examples
% ztcl::audio session
ambient
Errors
% ztcl::audio session solo
the audio session is not available on this platform
-errorcode ZTCL AUDIO UNAVAILABLE
% ztcl::audio session loud
bad session "loud": must be ambient, playback, or solo
-errorcode NONE
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