Home Contents | # audio.source | Audio | Core4 Lua Commands

## SYNOPSIS

1. audio.source(name)
2. name = audio.source()

## DESCRIPTION

Used to select or query the source used for recording audio. The value name must be one of the names returned by audio.sources().

## RETURN VALUE

Returns the name of the currently selected recording source.

## 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.

## EXAMPLE

>
print (audio.mix())
Mic
>
print (audio.mix("Line"))
Line
>
print (audio.mix("xyzzy"))
nil 22 Invalid argument

## SEE ALSO

audio.beep, audio.buzz, audio.mix, audio.mixers, audio.play, audio.sources, audio.vol