lao documentation
lao version 1.1.0 - 20170904
ao.openFile
Open a file for audio output. The file format is determined by the audio driver used.
userdata device, string error = ao.openLive(number driverId, string filename, boolean overwrite, table format, table options)
Parameters
- driverId
- filename
- Name of the file in which to store the audio.
- overwrite
-
True to overwrite the file if it exists, false to abort the opening
if a file with that name already exists.
- format
-
A table describing the sample format.
-
See also: sampleFormat
- options
-
A table containing options.
-
See also: options
Return Values
- device
-
A non-nil result indicates success. You can now use the devices
metamethods play and
close to play audio and close the
device.
-
A nil result means something went wrong. The error message is
returned as the second return value.
- error
-
A string describing what went wrong (if anything went wrong).
This can be one of the following:
- no such driver
- not a file-type driver
- a valid option-key has an invalid value
- cannot open the file
- file already exists
- something went wrong
Notes
Live output drivers cannot be used with this function. Use
ao.openLive instead.
When passed to ao.openFile, the byteFormat key
in the format table specifies the input sample format,
but does not change the byte format used in the file output.
developed by
Linus Sjögren,
daurnimator and
peterbillam
thelinx@unreliablepollution.net
back to index
this project at GitHub