- audio.mix(channel, switch)
- switch = audio.mix(channel)
- audio.mix(channel, left[,right])
- left, right = audio.mix(channel)
SYNOPSIS
DESCRIPTION
Controls or queries the state of a mixer control, where channel is one of the control names returned by audio.mixers().
For switch or mute controls, switch is a boolean value.
Stereo slider controls use a left and right value. If only one value is given, it is used for both, left and right.
A mono slider control uses the left value only. A passed right value is ignored.
RETURN VALUE
Switch controls return a boolean value indicating their state.
Stereo slider controls return two numbers, indicating their left and right values.
Mono slider controls return a single number.
ERRORS
On error, three values are returned: nil, a string describing the error (The result of the C
library call strerror() on the errno code) and the errno number from the standard C library.
NOTES
Use audio.vol() for generic volume control and use audio.mix() only for
more sophisticated code.
EXAMPLE
>
print(audio.mix("Master"))
200 200
>
print(audio.mix("Master.Mute"))
false
>
print(audio.mix("xyzzy"))
nil 22 Invalid argument